|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
net.spy.memcached.compat.SpyThread
net.spy.memcached.TapConnectionProvider
public class TapConnectionProvider
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TapConnectionProvider(InetSocketAddress... ia)
Get a memcache client operating on the specified memcached locations. |
|
TapConnectionProvider(List<InetSocketAddress> addrs)
Get a memcache client over the specified memcached locations. |
|
TapConnectionProvider(List<URI> baseList,
String bucketName,
String usr,
String pwd)
Get a MemcachedClient based on the REST response from a Membase server. |
|
| Method Summary | |
|---|---|
boolean |
addObserver(ConnectionObserver obs)
Add a connection observer. |
void |
connectionEstablished(SocketAddress sa,
int reconnectCount)
A connection has just successfully been established on the given socket. |
void |
connectionLost(SocketAddress sa)
A connection was just lost on the given socket. |
void |
reconfigure(Bucket bucket)
Call on a configuration update |
boolean |
removeObserver(ConnectionObserver obs)
Remove a connection observer. |
void |
run()
Infinitely loop processing IO. |
void |
shutdown()
Shut down immediately. |
boolean |
shutdown(long timeout,
TimeUnit unit)
Shut down this client gracefully. |
boolean |
waitForQueues(long timeout,
TimeUnit unit)
Wait for the queues to die down. |
| Methods inherited from class net.spy.memcached.compat.SpyThread |
|---|
getLogger |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TapConnectionProvider(InetSocketAddress... ia)
throws IOException
ia - the memcached locations
IOException - if connections cannot be established
public TapConnectionProvider(List<InetSocketAddress> addrs)
throws IOException
addrs - the socket addrs
IOException - if connections cannot be established
public TapConnectionProvider(List<URI> baseList,
String bucketName,
String usr,
String pwd)
throws IOException,
ConfigurationException
baseList - bucketName - usr - pwd -
IOException
ConfigurationException| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Threadpublic 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(SocketAddress sa,
int reconnectCount)
ConnectionObserver
connectionEstablished in interface ConnectionObserversa - the address of the node whose connection was establishedreconnectCount - the number of attempts before the connection was
establishedpublic void connectionLost(SocketAddress sa)
ConnectionObserver
connectionLost in interface ConnectionObserversa - the address of the node whose connection was lostpublic void reconfigure(Bucket bucket)
Reconfigurable
reconfigure in interface Reconfigurablebucket - updated vbucket configurationpublic void shutdown()
public boolean shutdown(long timeout,
TimeUnit unit)
timeout - the amount of time for shutdownunit - the TimeUnit for the timeout
public boolean waitForQueues(long timeout,
TimeUnit unit)
timeout - the amount of time time for shutdownunit - the TimeUnit for the timeout
IllegalStateException - in the rare circumstance where queue
is too full to accept any more requests
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||