voldemort.client
Interface StoreClientFactory

All Known Implementing Classes:
AbstractStoreClientFactory, CachingStoreClientFactory, HttpStoreClientFactory, MockStoreClientFactory, SocketStoreClientFactory

public interface StoreClientFactory

An abstraction the represents a connection to a Voldemort cluster and can be used to create StoreClient instances to interact with individual stores. The factory abstracts away any connection pools, thread pools, or other details that will be shared by all the individual StoreClient


Method Summary
 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>> inconsistencyResolver)
          Get a StoreClient for the given store.
 

Method Detail

getStoreClient

<K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName)
Get a StoreClient for the given store.

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

<K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName,
                                      InconsistencyResolver<Versioned<V>> inconsistencyResolver)
Get a StoreClient for the given store.

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
inconsistencyResolver - The InconsistencyResolver that should be used to resolve inconsistencies.
Returns:
A fully constructed StoreClient

getRawStore

<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

Parameters:
storeName - The name of the store
resolver - The inconsistency resolver
Returns:
The appropriate store

close

void close()
Close the store client


getFailureDetector

FailureDetector getFailureDetector()
Returns the FailureDetector specific to the cluster against which this client factory is based.

Returns:
FailureDetector


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