voldemort.client
Class SocketStoreClientFactory

java.lang.Object
  extended by voldemort.client.AbstractStoreClientFactory
      extended by 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.


Field Summary
static java.lang.String URL_SCHEME
           
 
Fields inherited from class voldemort.client.AbstractStoreClientFactory
clusterMapper, DEFAULT_ROUTING_TIMEOUT_MS, failureDetector, logger
 
Constructor Summary
SocketStoreClientFactory(ClientConfig config)
           
 
Method Summary
 void close()
          Close the store client
protected  int getPort(voldemort.cluster.Node node)
           
protected  voldemort.store.Store<voldemort.utils.ByteArray,byte[]> getStore(java.lang.String storeName, java.lang.String host, int port, RequestFormatType type)
           
protected  voldemort.cluster.failuredetector.FailureDetector initFailureDetector(ClientConfig config, java.util.Collection<voldemort.cluster.Node> nodes)
           
protected  void validateUrl(java.net.URI url)
           
 
Methods inherited from class voldemort.client.AbstractStoreClientFactory
bootstrapMetadataWithRetries, bootstrapMetadataWithRetries, getFailureDetector, getRawStore, getRoutingTimeoutMs, getSerializerFactory, getStoreClient, getStoreClient, getThreadPool, validateUrls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_SCHEME

public static final java.lang.String URL_SCHEME
See Also:
Constant Field Values
Constructor Detail

SocketStoreClientFactory

public SocketStoreClientFactory(ClientConfig config)
Method Detail

getStore

protected voldemort.store.Store<voldemort.utils.ByteArray,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