Пример #1
0
 public KeyValueStoreManagerAdapter(
     KeyValueStoreManager manager, Map<String, Integer> keyLengths) {
   this.manager = manager;
   ImmutableMap.Builder<String, Integer> mb = ImmutableMap.builder();
   if (keyLengths != null && !keyLengths.isEmpty()) mb.putAll(keyLengths);
   this.keyLengths = mb.build();
   features = manager.getFeatures().clone();
   features.supportsBatchMutation = false;
 }
Пример #2
0
 @Override
 public void setConfigurationProperty(final String key, final String value)
     throws StorageException {
   manager.setConfigurationProperty(key, value);
 }
Пример #3
0
 @Override
 public String getConfigurationProperty(final String key) throws StorageException {
   return manager.getConfigurationProperty(key);
 }
Пример #4
0
 @Override
 public KeyColumnValueStore openDatabase(String name) throws StorageException {
   return wrapKeyValueStore(manager.openDatabase(name), keyLengths);
 }
Пример #5
0
 @Override
 public void clearStorage() throws StorageException {
   manager.clearStorage();
 }
Пример #6
0
 @Override
 public StoreTransaction beginTransaction(ConsistencyLevel level) throws StorageException {
   return manager.beginTransaction(level);
 }