|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.memcached.MemcachedConnection
public final class MemcachedConnection
Connection to a cluster of memcached servers.
| Constructor Summary | |
|---|---|
MemcachedConnection(int bufSize,
ConnectionFactory f,
java.util.List<java.net.InetSocketAddress> a)
Construct a memcached connection. |
|
| Method Summary | |
|---|---|
void |
addOperation(MemcachedNode node,
Operation o)
|
void |
addOperation(java.lang.String key,
Operation o)
Add an operation to the given connection. |
void |
addOperations(java.util.Map<MemcachedNode,Operation> ops)
|
java.util.concurrent.CountDownLatch |
broadcastOperation(BroadcastOpFactory of)
Broadcast an operation to all nodes. |
void |
handleIO()
MemcachedClient calls this method to handle IO over the connections. |
void |
setGetOptimization(boolean to)
Enable or disable get optimization. |
void |
shutdown()
Shut down all of the connections. |
java.lang.String |
toString()
|
| Methods inherited from class net.spy.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,
java.util.List<java.net.InetSocketAddress> a)
throws java.io.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
java.io.IOException - if a connection attempt fails early| Method Detail |
|---|
public void setGetOptimization(boolean to)
public void handleIO()
throws java.io.IOException
java.io.IOException
public void addOperation(java.lang.String key,
Operation o)
which - the connection offseto - the operation
public void addOperation(MemcachedNode node,
Operation o)
public void addOperations(java.util.Map<MemcachedNode,Operation> ops)
public java.util.concurrent.CountDownLatch broadcastOperation(BroadcastOpFactory of)
public void shutdown()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||