|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.client.AbstractStoreClientFactory
public abstract class AbstractStoreClientFactory
A base class for various StoreClientFactory
implementations
Field Summary | |
---|---|
protected static ClusterMapper |
clusterMapper
|
static int |
DEFAULT_ROUTING_TIMEOUT_MS
|
protected FailureDetector |
failureDetector
|
protected java.lang.String |
identifierString
|
protected static org.apache.log4j.Logger |
logger
|
static int |
MAX_METADATA_REFRESH_ATTEMPTS
|
Constructor Summary | |
---|---|
AbstractStoreClientFactory(ClientConfig config)
|
Method Summary | ||
---|---|---|
java.lang.String |
bootstrapMetadataWithRetries(java.lang.String key)
|
|
java.lang.String |
bootstrapMetadataWithRetries(java.lang.String key,
java.net.URI[] urls)
|
|
void |
close()
Close the store client |
|
protected java.lang.String |
getClientContext()
|
|
Cluster |
getCluster()
|
|
protected ClientConfig |
getConfig()
|
|
int |
getCurrentJmxId()
|
|
FailureDetector |
getFailureDetector()
Returns the FailureDetector specific to the cluster against which this client factory is based. |
|
int |
getNextJmxId()
|
|
protected abstract int |
getPort(Node node)
|
|
|
getRawStore(java.lang.String storeName,
InconsistencyResolver<Versioned<V>> resolver)
Get the underlying store, not the public StoreClient interface |
|
|
getRawStore(java.lang.String storeName,
InconsistencyResolver<Versioned<V>> resolver,
java.lang.String customStoresXml,
java.lang.String clusterXmlString,
FailureDetector fd)
|
|
protected java.util.List<Versioned<java.lang.String>> |
getRemoteMetadata(java.lang.String key,
java.net.URI url)
|
|
RequestFormatType |
getRequestFormatType()
|
|
SerializerFactory |
getSerializerFactory()
|
|
protected abstract Store<ByteArray,byte[],byte[]> |
getStore(java.lang.String storeName,
java.lang.String host,
int port,
RequestFormatType type)
|
|
|
getStoreClient(java.lang.String storeName)
Get a StoreClient for the given store. |
|
|
getStoreClient(java.lang.String storeName,
InconsistencyResolver<Versioned<V>> resolver)
Get a StoreClient for the given store. |
|
java.util.List<StoreDefinition> |
getStoreDefs()
|
|
protected abstract FailureDetector |
initFailureDetector(ClientConfig config,
Cluster cluster)
|
|
protected abstract void |
validateUrl(java.net.URI url)
|
|
java.net.URI[] |
validateUrls(java.lang.String[] urls)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_ROUTING_TIMEOUT_MS
public static final int MAX_METADATA_REFRESH_ATTEMPTS
protected static final ClusterMapper clusterMapper
protected static final org.apache.log4j.Logger logger
protected final java.lang.String identifierString
protected volatile FailureDetector failureDetector
Constructor Detail |
---|
public AbstractStoreClientFactory(ClientConfig config)
Method Detail |
---|
public int getNextJmxId()
public int getCurrentJmxId()
public <K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName)
StoreClientFactory
StoreClient
for the given store.
getStoreClient
in interface StoreClientFactory
K
- The type of the key of the
StoreClient
V
- The type of the value of the
StoreClient
storeName
- The name of the store
StoreClient
public <K,V> StoreClient<K,V> getStoreClient(java.lang.String storeName, InconsistencyResolver<Versioned<V>> resolver)
StoreClientFactory
StoreClient
for the given store.
getStoreClient
in interface StoreClientFactory
K
- The type of the key of the
StoreClient
V
- The type of the value of the
StoreClient
storeName
- The name of the storeresolver
- The
InconsistencyResolver
that should be
used to resolve inconsistencies.
StoreClient
public <K,V,T> Store<K,V,T> getRawStore(java.lang.String storeName, InconsistencyResolver<Versioned<V>> resolver)
StoreClientFactory
getRawStore
in interface StoreClientFactory
storeName
- The name of the storeresolver
- The inconsistency resolver
public <K,V,T> Store<K,V,T> getRawStore(java.lang.String storeName, InconsistencyResolver<Versioned<V>> resolver, java.lang.String customStoresXml, java.lang.String clusterXmlString, FailureDetector fd)
protected ClientConfig getConfig()
protected abstract FailureDetector initFailureDetector(ClientConfig config, Cluster cluster)
public FailureDetector getFailureDetector()
StoreClientFactory
getFailureDetector
in interface StoreClientFactory
public java.lang.String bootstrapMetadataWithRetries(java.lang.String key, java.net.URI[] urls)
public java.lang.String bootstrapMetadataWithRetries(java.lang.String key)
protected java.util.List<Versioned<java.lang.String>> getRemoteMetadata(java.lang.String key, java.net.URI url)
public java.net.URI[] validateUrls(java.lang.String[] urls)
protected abstract Store<ByteArray,byte[],byte[]> getStore(java.lang.String storeName, java.lang.String host, int port, RequestFormatType type)
protected abstract int getPort(Node node)
protected abstract void validateUrl(java.net.URI url)
public SerializerFactory getSerializerFactory()
public RequestFormatType getRequestFormatType()
public void close()
StoreClientFactory
close
in interface StoreClientFactory
protected java.lang.String getClientContext()
public Cluster getCluster()
public java.util.List<StoreDefinition> getStoreDefs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |