|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.memcached.compat.SpyObject
net.spy.memcached.MemcachedConnection
public final class MemcachedConnection
Connection to a cluster of memcached servers.
| Constructor Summary | |
|---|---|
MemcachedConnection(int bufSize,
ConnectionFactory f,
List<InetSocketAddress> a,
Collection<ConnectionObserver> obs,
FailureMode fm,
OperationFactory opfactory)
Construct a memcached connection. |
|
| Method Summary | |
|---|---|
boolean |
addObserver(ConnectionObserver obs)
Add a connection observer. |
void |
addOperation(MemcachedNode node,
Operation o)
|
void |
addOperation(String key,
Operation o)
Add an operation to the given connection. |
void |
addOperations(Map<MemcachedNode,Operation> ops)
|
CountDownLatch |
broadcastOperation(BroadcastOpFactory of)
Broadcast an operation to all nodes. |
void |
handleIO()
MemcachedClient calls this method to handle IO over the connections. |
boolean |
removeObserver(ConnectionObserver obs)
Remove a connection observer. |
void |
shutdown()
Shut down all of the connections. |
String |
toString()
|
| Methods inherited from class net.spy.memcached.compat.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MemcachedConnection(int bufSize,
ConnectionFactory f,
List<InetSocketAddress> a,
Collection<ConnectionObserver> obs,
FailureMode fm,
OperationFactory opfactory)
throws IOException
bufSize - the size of the buffer used for reading from the serverf - the factory that will provide an operation queuea - the addresses of the servers to connect to
IOException - if a connection attempt fails early| Method Detail |
|---|
public void handleIO()
throws IOException
IOExceptionpublic boolean addObserver(ConnectionObserver obs)
public boolean removeObserver(ConnectionObserver obs)
public void addOperation(String key,
Operation o)
key - the key the operation is operating upono - the operation
public void addOperation(MemcachedNode node,
Operation o)
public void addOperations(Map<MemcachedNode,Operation> ops)
public CountDownLatch broadcastOperation(BroadcastOpFactory of)
public void shutdown()
throws IOException
IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||