Package com.thinkaurelius.titan.diskstorage

Examples of com.thinkaurelius.titan.diskstorage.StorageException


        StaticBuffer thirdCol = recordSuccessfulLockWrite(5, TimeUnit.SECONDS, secondCol).col;
        recordSuccessfulLockDelete(1, TimeUnit.NANOSECONDS, thirdCol);
        recordSuccessfulLocalUnlock();
        ctrl.replay();

        StorageException expected = null;
        try {
            locker.writeLock(defaultLockID, defaultTx); // SUT
        } catch (TemporaryStorageException e) {
            expected = e;
        }
View Full Code Here


        StaticBuffer lockCol = recordExceptionLockWrite(1, TimeUnit.NANOSECONDS, null, errOnFire);
        recordSuccessfulLockDelete(1, TimeUnit.NANOSECONDS, lockCol);
        recordSuccessfulLocalUnlock();
        ctrl.replay();

        StorageException expected = null;
        try {
            locker.writeLock(defaultLockID, defaultTx); // SUT
        } catch (PermanentLockingException e) {
            expected = e;
        }
        assertNotNull(expected);
        assertEquals(errOnFire, expected.getCause());
    }
View Full Code Here

    private static final long BASE_REATTEMPT_TIME_MS=50;

    public static final<V> V execute(Callable<V> exe, long maxTimeMS) throws TitanException {
        long waitTime = BASE_REATTEMPT_TIME_MS;
        long maxTime = System.currentTimeMillis()+maxTimeMS;
        StorageException lastException = null;
        do {
            try {
                return exe.call();
            } catch (StorageException e) {
                if (e instanceof TemporaryStorageException) lastException = e;
View Full Code Here

    public static final<V> V execute(Callable<V> exe, int maxRetryAttempts, long retryWaittime) throws TitanException {
        Preconditions.checkArgument(maxRetryAttempts>0,"Retry attempts must be positive");
        Preconditions.checkArgument(retryWaittime>=0,"Retry wait time must be non-negative");
        int retryAttempts = 0;
        StorageException lastException = null;
        do {
            try {
                return exe.call();
            } catch (StorageException e) {
                if (e instanceof TemporaryStorageException) lastException = e;
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.diskstorage.StorageException

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.