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; }
@Override public void setConfigurationProperty(final String key, final String value) throws StorageException { manager.setConfigurationProperty(key, value); }
@Override public String getConfigurationProperty(final String key) throws StorageException { return manager.getConfigurationProperty(key); }
@Override public KeyColumnValueStore openDatabase(String name) throws StorageException { return wrapKeyValueStore(manager.openDatabase(name), keyLengths); }
@Override public void clearStorage() throws StorageException { manager.clearStorage(); }
@Override public StoreTransaction beginTransaction(ConsistencyLevel level) throws StorageException { return manager.beginTransaction(level); }