voldemort.client
Class SocketStoreClientFactory
java.lang.Object
voldemort.client.AbstractStoreClientFactory
voldemort.client.SocketStoreClientFactory
- All Implemented Interfaces:
- StoreClientFactory
public class SocketStoreClientFactory
- extends AbstractStoreClientFactory
A StoreClientFactory abstracts away the connection pooling, threading, and
bootstrapping mechanism. It can be used to create any number of
StoreClient instances for different
stores.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URL_SCHEME
public static final java.lang.String URL_SCHEME
- See Also:
- Constant Field Values
SocketStoreClientFactory
public SocketStoreClientFactory(ClientConfig config)
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- Overrides:
getStoreClient in class AbstractStoreClientFactory
- Type Parameters:
K - The type of the key of the
StoreClientV - The type of the value of the
StoreClient- Parameters:
storeName - The name of the storeresolver - The
InconsistencyResolver that should be
used to resolve inconsistencies.
- Returns:
- A fully constructed
StoreClient
getRemoteMetadata
protected java.util.List<Versioned<java.lang.String>> getRemoteMetadata(java.lang.String key,
java.net.URI url)
- Overrides:
getRemoteMetadata in class AbstractStoreClientFactory
getStore
protected voldemort.store.Store<voldemort.utils.ByteArray,byte[],byte[]> getStore(java.lang.String storeName,
java.lang.String host,
int port,
RequestFormatType type)
- Specified by:
getStore in class AbstractStoreClientFactory
initFailureDetector
protected voldemort.cluster.failuredetector.FailureDetector initFailureDetector(ClientConfig config,
java.util.Collection<voldemort.cluster.Node> nodes)
- Specified by:
initFailureDetector in class AbstractStoreClientFactory
getPort
protected int getPort(voldemort.cluster.Node node)
- Specified by:
getPort in class AbstractStoreClientFactory
validateUrl
protected void validateUrl(java.net.URI url)
- Specified by:
validateUrl in class AbstractStoreClientFactory
close
public void close()
- Description copied from interface:
StoreClientFactory
- Close the store client
- Specified by:
close in interface StoreClientFactory- Overrides:
close in class AbstractStoreClientFactory
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao