Package com.thinkaurelius.titan.diskstorage.locking.consistentkey

Examples of com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction


                    KeyColumnValueStore lockerStore = manager[i].openDatabase(DB_NAME + "_lock_");
                    ConsistentKeyLocker c = new ConsistentKeyLocker.Builder(lockerStore).fromCommonsConfig(sc).mediatorName(concreteClassName + i).build();
                    store[i] = new ExpectedValueCheckingStore(store[i], c);
                    for (int j = 0; j < NUM_TX; j++)
                        tx[i][j] = new ExpectedValueCheckingTransaction(tx[i][j], manager[i].beginTransaction(new StoreTxConfig(ConsistencyLevel.KEY_CONSISTENT)), GraphDatabaseConfiguration.READ_ATTEMPTS_DEFAULT);
                } else throw new IllegalArgumentException("Store needs to support some form of locking");
            }
        }
    }
View Full Code Here


    }

    public StoreTransaction newTransaction(KeyColumnValueStoreManager manager) throws StorageException {
        StoreTransaction transaction = manager.beginTransaction(new StoreTxConfig());
        if (!manager.getFeatures().supportsLocking() && manager.getFeatures().supportsConsistentKeyOperations()) {
            transaction = new ExpectedValueCheckingTransaction(transaction, manager.beginTransaction(new StoreTxConfig(ConsistencyLevel.KEY_CONSISTENT)), GraphDatabaseConfiguration.READ_ATTEMPTS_DEFAULT);
        }
        return transaction;
    }
View Full Code Here

            if (storeFeatures.supportsTransactions()) {
                //No transaction wrapping needed
            } else if (storeFeatures.supportsConsistentKeyOperations()) {
                txConfig = new StoreTxConfig(ConsistencyLevel.KEY_CONSISTENT, configuration.getMetricsPrefix());
                if (configuration.hasTimestamp()) txConfig.setTimestamp(configuration.getTimestamp());
                tx = new ExpectedValueCheckingTransaction(tx,
                        storeManager.beginTransaction(txConfig),
                        readAttempts);
            }
        }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.diskstorage.locking.consistentkey.ExpectedValueCheckingTransaction

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.