Skip to content

Commit

Permalink
Adding System store functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinmay Soman authored and Lei Gao committed Jun 27, 2012
1 parent b2cbdf8 commit ea64953
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/java/voldemort/client/DefaultStoreClient.java
Expand Up @@ -69,6 +69,7 @@ public class DefaultStoreClient<K, V> implements StoreClient<K, V> {
private final InconsistencyResolver<Versioned<V>> resolver;
private volatile Store<K, V, Object> store;
private final UUID clientId;

private final Map<String, SystemStore> sysStoreMap;
private AsyncMetadataVersionManager asyncCheckMetadata;

Expand Down Expand Up @@ -149,6 +150,13 @@ public void initializeSystemStores() {
public void bootStrap() {
logger.info("Bootstrapping metadata for store " + this.storeName);
this.store = storeFactory.getRawStore(storeName, resolver, clientId);

logger.info("Creating System store");
String systemKey = storeName + "-client";
this.sysStore = new SystemStore<String, String>("voldsys$_client_registry",
this.storeFactory);
sysStore.putSysStore(systemKey, "Registered");
logger.info("Getting value - " + sysStore.getSysStore(systemKey));
}

public boolean delete(K key) {
Expand Down

0 comments on commit ea64953

Please sign in to comment.