|
||||||||||
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.TapConnectionProvider
public class TapConnectionProvider
A TapConnectionProvider.
Field Summary | |
---|---|
protected AuthDescriptor |
authDescriptor
|
protected AuthThreadMonitor |
authMonitor
|
protected MemcachedConnection |
conn
|
protected OperationFactory |
opFact
|
protected boolean |
shuttingDown
|
protected TranscodeService |
tcService
|
Constructor Summary | |
---|---|
TapConnectionProvider(ConnectionFactory cf,
java.util.List<java.net.InetSocketAddress> addrs)
Get a tap client operating on the specified memcached locations. |
|
TapConnectionProvider(java.net.InetSocketAddress... ia)
Get a tap client operating on the specified memcached locations. |
|
TapConnectionProvider(java.util.List<java.net.InetSocketAddress> addrs)
Get a tap client operating on the specified memcached locations. |
Method Summary | |
---|---|
boolean |
addObserver(ConnectionObserver obs)
Add a connection observer. |
protected void |
addOp(Operation op)
|
void |
connectionEstablished(java.net.SocketAddress sa,
int reconnectCount)
A connection has just successfully been established on the given socket. |
void |
connectionLost(java.net.SocketAddress sa)
A connection was just lost on the given socket. |
OperationFactory |
getOpFactory()
|
boolean |
removeObserver(ConnectionObserver obs)
Remove a connection observer. |
void |
shutdown()
Shut down immediately. |
boolean |
shutdown(long timeout,
java.util.concurrent.TimeUnit unit)
Shut down this client gracefully. |
boolean |
waitForQueues(long timeout,
java.util.concurrent.TimeUnit unit)
Wait for the queues to die down. |
Methods inherited from class net.spy.memcached.compat.SpyObject |
---|
getLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile boolean shuttingDown
protected final MemcachedConnection conn
protected final OperationFactory opFact
protected final TranscodeService tcService
protected final AuthDescriptor authDescriptor
protected final AuthThreadMonitor authMonitor
Constructor Detail |
---|
public TapConnectionProvider(java.net.InetSocketAddress... ia) throws java.io.IOException
ia
- the memcached locations
java.io.IOException
- if connections cannot be establishedpublic TapConnectionProvider(java.util.List<java.net.InetSocketAddress> addrs) throws java.io.IOException
addrs
- the socket addrs
java.io.IOException
- if connections cannot be establishedpublic TapConnectionProvider(ConnectionFactory cf, java.util.List<java.net.InetSocketAddress> addrs) throws java.io.IOException
cf
- the connection factory to configure connections for this clientaddrs
- the socket addresses
java.io.IOException
- if connections cannot be establishedMethod Detail |
---|
protected void addOp(Operation op)
public boolean addObserver(ConnectionObserver obs)
obs
- the ConnectionObserver you wish to add
public boolean removeObserver(ConnectionObserver obs)
obs
- the ConnectionObserver you wish to add
public void connectionEstablished(java.net.SocketAddress sa, int reconnectCount)
ConnectionObserver
connectionEstablished
in interface ConnectionObserver
sa
- the address of the node whose connection was establishedreconnectCount
- the number of attempts before the connection was
establishedpublic void connectionLost(java.net.SocketAddress sa)
ConnectionObserver
connectionLost
in interface ConnectionObserver
sa
- the address of the node whose connection was lostpublic void shutdown()
public boolean shutdown(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- the amount of time for shutdownunit
- the TimeUnit for the timeout
public boolean waitForQueues(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- the amount of time time for shutdownunit
- the TimeUnit for the timeout
java.lang.IllegalStateException
- in the rare circumstance where queue is too
full to accept any more requestspublic OperationFactory getOpFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |