Пример #1
0
 /**
  * Clears the storage of all registered backend data providers. This includes backend storage
  * engines and index providers.
  *
  * <p>IMPORTANT: Clearing storage means that ALL data will be lost and cannot be recovered.
  *
  * @throws StorageException
  */
 public void clearStorage() throws StorageException {
   edgeStore.close();
   vertexIndexStore.close();
   edgeIndexStore.close();
   idAuthority.close();
   storeManager.clearStorage();
   // Indexes
   for (IndexProvider index : indexes.values()) index.clearStorage();
 }
Пример #2
0
 private KeyColumnValueStore getLockStore(KeyColumnValueStore store) throws StorageException {
   if (!storeFeatures.supportsLocking()) {
     if (storeFeatures.isTransactional()) {
       store = new TransactionalLockStore(store);
     } else if (storeFeatures.supportsConsistentKeyOperations()) {
       store =
           new ConsistentKeyLockStore(
               store, getStore(store.getName() + LOCK_STORE_SUFFIX), lockConfiguration);
     } else throw new IllegalArgumentException("Store needs to support some form of locking");
   }
   return store;
 }
Пример #3
0
 private KeyColumnValueStore getLockStore(KeyColumnValueStore store, boolean lockEnabled)
     throws StorageException {
   if (!storeFeatures.supportsLocking()) {
     if (storeFeatures.supportsTransactions()) {
       store = new TransactionalLockStore(store);
     } else if (storeFeatures.supportsConsistentKeyOperations()) {
       if (lockEnabled) {
         final String lockerName = store.getName() + LOCK_STORE_SUFFIX;
         store = new ExpectedValueCheckingStore(store, getLocker(lockerName));
       } else {
         store = new ExpectedValueCheckingStore(store, null);
       }
     } else throw new IllegalArgumentException("Store needs to support some form of locking");
   }
   return store;
 }
Пример #4
0
 public void clearStorage() throws StorageException {
   edgeStore.close();
   vertexIndexStore.close();
   idAuthority.close();
   storeManager.clearStorage();
 }