Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.DatastoreTimeoutException


            throws NullPointerException {
        if (kind == null) {
            throw new NullPointerException("The kind parameter is null.");
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        DatastoreTimeoutException dte = null;
        long wait = INITIAL_WAIT_MS;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                return ds.allocateIds(kind, num);
            } catch (DatastoreTimeoutException e) {
View Full Code Here


        }
        if (kind == null) {
            throw new NullPointerException("The kind parameter is null.");
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        DatastoreTimeoutException dte = null;
        long wait = INITIAL_WAIT_MS;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                return ds.allocateIds(parentKey, kind, num);
            } catch (DatastoreTimeoutException e) {
View Full Code Here

            throw new NullPointerException(
                "The key parameter must not be null.");
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        try {
            DatastoreTimeoutException dte = null;
            long wait = INITIAL_WAIT_MS;
            for (int i = 0; i < MAX_RETRY; i++) {
                try {
                    return ds.get(key);
                } catch (DatastoreTimeoutException e) {
View Full Code Here

        if (tx != null && !tx.isActive()) {
            throw new IllegalStateException("The transaction must be active.");
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        try {
            DatastoreTimeoutException dte = null;
            long wait = INITIAL_WAIT_MS;
            for (int i = 0; i < MAX_RETRY; i++) {
                try {
                    return ds.get(tx, key);
                } catch (DatastoreTimeoutException e) {
View Full Code Here

        }
        if (keys instanceof Collection<?> && ((Collection<?>) keys).size() == 0) {
            return new HashMap<Key, Entity>();
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        DatastoreTimeoutException dte = null;
        long wait = INITIAL_WAIT_MS;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                return ds.get(keys);
            } catch (DatastoreTimeoutException e) {
View Full Code Here

        }
        if (keys instanceof Collection<?> && ((Collection<?>) keys).size() == 0) {
            return new HashMap<Key, Entity>();
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        DatastoreTimeoutException dte = null;
        long wait = INITIAL_WAIT_MS;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                return ds.get(tx, keys);
            } catch (DatastoreTimeoutException e) {
View Full Code Here

        }
        byte[] requestBuf = putRequest.toByteArray();
        ConcurrentModificationException cme = null;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                DatastoreTimeoutException dte = null;
                long wait = INITIAL_WAIT_MS;
                for (int j = 0; j < MAX_RETRY; j++) {
                    try {
                        ApiProxy.makeSyncCall(
                            DATASTORE_SERVICE,
View Full Code Here

        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        ConcurrentModificationException cme = null;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                DatastoreTimeoutException dte = null;
                long wait = INITIAL_WAIT_MS;
                for (int j = 0; j < MAX_RETRY; j++) {
                    try {
                        for (Iterable<Key> keys2 : IterableUtil.split(
                            keys,
View Full Code Here

        }
        if (keys instanceof Collection<?> && ((Collection<?>) keys).size() == 0) {
            return;
        }
        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
        DatastoreTimeoutException dte = null;
        long wait = INITIAL_WAIT_MS;
        for (int i = 0; i < MAX_RETRY; i++) {
            try {
                for (Iterable<Key> keys2 : IterableUtil.split(
                    keys,
View Full Code Here

    EasyMock.expect(delegate.makeAsyncCall(EasyMock.isA(ApiProxy.Environment.class),
                              EasyMock.eq(LocalDatastoreService.PACKAGE),
                              EasyMock.eq("RunQuery"),
                              EasyMock.isA(byte[].class),
                              ApiConfigMatcher.eqApiConfig(config)))
            .andThrow(new DatastoreTimeoutException("too long")).anyTimes();
    EasyMock.replay(delegate);
    ApiProxy.Delegate original = getDelegateForThread();
    setDelegateForThread(delegate);

    try {
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.DatastoreTimeoutException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.