voldemort.store.socket
Interface SocketStoreFactory

All Known Implementing Classes:
ClientRequestExecutorPool

public interface SocketStoreFactory

SocketStoreFactory manages the creation of SocketStore instances. Under the covers there are often shared resources (socket pools, etc.) that are initialized (and destroyed) in a single section of code rather than distributed over multiple methods/classes/packages.


Method Summary
 void close()
          Closes the entire factory, which means that any shared resources used by socket store implementations will be closed as well.
 void close(SocketDestination destination)
          This closes the resources for a specific host, usually in response to an error in communicating with that host.
 SocketStore create(java.lang.String storeName, java.lang.String hostName, int port, RequestFormatType requestFormatType, RequestRoutingType requestRoutingType)
          Creates a new SocketStore using the specified store name, remote server, format type and routing type.
 

Method Detail

create

SocketStore create(java.lang.String storeName,
                   java.lang.String hostName,
                   int port,
                   RequestFormatType requestFormatType,
                   RequestRoutingType requestRoutingType)
Creates a new SocketStore using the specified store name, remote server, format type and routing type.

Parameters:
storeName - Name of store
hostName - Host name of remote Voldemort node
port - Port on which hostName is listening
requestFormatType - RequestFormatType
requestRoutingType - RequestRoutingType
Returns:
New SocketStore

close

void close()
Closes the entire factory, which means that any shared resources used by socket store implementations will be closed as well. It is therefore best to close all SocketStore instances first, then close the socket store factory.


close

void close(SocketDestination destination)
This closes the resources for a specific host, usually in response to an error in communicating with that host.

Parameters:
destination - SocketDestination representing the host name, port, etc. for a remote host


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