voldemort.client
Class CachingStoreClientFactory

java.lang.Object
  extended by voldemort.client.CachingStoreClientFactory
All Implemented Interfaces:
StoreClientFactory

public class CachingStoreClientFactory
extends java.lang.Object
implements StoreClientFactory

A wrapper for a store StoreClientFactory which caches requests to getStoreClient


Constructor Summary
CachingStoreClientFactory(StoreClientFactory inner)
           
 
Method Summary
 void bootstrapAllClients()
           
 void clear()
           
 void close()
          Close the store client
 FailureDetector getFailureDetector()
          Returns the FailureDetector specific to the cluster against which this client factory is based.
<K,V,T> Store<K,V,T>
getRawStore(java.lang.String storeName, InconsistencyResolver<Versioned<V>> resolver)
          Get the underlying store, not the public StoreClient interface
<K,V> StoreClient<K,V>
getStoreClient(java.lang.String storeName)
          Get a StoreClient for the given store.
<K,V> StoreClient<K,V>
getStoreClient(java.lang.String storeName, InconsistencyResolver<Versioned<V>> resolver)
          Get a StoreClient for the given store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingStoreClientFactory

public CachingStoreClientFactory(StoreClientFactory inner)
Method Detail

getStoreClient

public <K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName)
Description copied from interface: StoreClientFactory
Get a StoreClient for the given store.

Specified by:
getStoreClient in interface StoreClientFactory
Type Parameters:
K - The type of the key of the StoreClient
V - The type of the value of the StoreClient
Parameters:
storeName - The name of the store
Returns:
A fully constructed StoreClient

getStoreClient

public <K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName,
                                             InconsistencyResolver<Versioned<V>> resolver)
Description copied from interface: StoreClientFactory
Get a StoreClient for the given store.

Specified by:
getStoreClient in interface StoreClientFactory
Type Parameters:
K - The type of the key of the StoreClient
V - The type of the value of the StoreClient
Parameters:
storeName - The name of the store
resolver - The InconsistencyResolver that should be used to resolve inconsistencies.
Returns:
A fully constructed StoreClient

getRawStore

public <K,V,T> Store<K,V,T> getRawStore(java.lang.String storeName,
                                        InconsistencyResolver<Versioned<V>> resolver)
Description copied from interface: StoreClientFactory
Get the underlying store, not the public StoreClient interface

Specified by:
getRawStore in interface StoreClientFactory
Parameters:
storeName - The name of the store
resolver - The inconsistency resolver
Returns:
The appropriate store

close

public void close()
Description copied from interface: StoreClientFactory
Close the store client

Specified by:
close in interface StoreClientFactory

getFailureDetector

public FailureDetector getFailureDetector()
Description copied from interface: StoreClientFactory
Returns the FailureDetector specific to the cluster against which this client factory is based.

Specified by:
getFailureDetector in interface StoreClientFactory
Returns:
FailureDetector

clear

public void clear()

bootstrapAllClients

public void bootstrapAllClients()


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu