|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.memcached.TapClient
public class TapClient
A tap client for memcached.
| Field Summary | |
|---|---|
protected long |
messagesRead
|
protected java.util.HashMap<TapStream,TapConnectionProvider> |
omap
|
protected java.util.concurrent.BlockingQueue<java.lang.Object> |
rqueue
|
| Constructor Summary | |
|---|---|
TapClient(java.net.InetSocketAddress... ia)
Creates a tap client against the specified servers. |
|
TapClient(java.util.List<java.net.InetSocketAddress> addrs)
Creates a tap client against the specified servers. |
|
| Method Summary | |
|---|---|
long |
getMessagesRead()
The number of messages read by all of the tap streams created with this client. |
ResponseMessage |
getNextMessage()
Gets the next tap message from the queue of received tap messages. |
ResponseMessage |
getNextMessage(long time,
java.util.concurrent.TimeUnit timeunit)
Gets the next tap message from the queue of received tap messages. |
boolean |
hasMoreMessages()
Decides whether the client has received tap messages or will receive more messages in the future. |
void |
shutdown()
Shuts down all tap streams that are currently running. |
TapStream |
tapCustom(java.lang.String id,
RequestMessage message)
Allows the user to specify a custom tap message. |
TapStream |
tapDump(java.lang.String id)
Specifies a tap stream that will take a snapshot of items in memcached and send them through a tap stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.concurrent.BlockingQueue<java.lang.Object> rqueue
protected final java.util.HashMap<TapStream,TapConnectionProvider> omap
protected long messagesRead
| Constructor Detail |
|---|
public TapClient(java.net.InetSocketAddress... ia)
ia - the addresses of each node in the cluster.public TapClient(java.util.List<java.net.InetSocketAddress> addrs)
addrs - a list of addresses containing each node in the cluster.| Method Detail |
|---|
public ResponseMessage getNextMessage()
public ResponseMessage getNextMessage(long time,
java.util.concurrent.TimeUnit timeunit)
time - the amount of time to wait for a message.timeunit - the unit of time to use.
public boolean hasMoreMessages()
public TapStream tapCustom(java.lang.String id,
RequestMessage message)
throws javax.naming.ConfigurationException,
java.io.IOException
id - the named tap id that can be used to resume a disconnected tap
streammessage - the custom tap message that will be used to initiate the tap
stream.
javax.naming.ConfigurationException - a bad configuration was received from the
memcached cluster.
java.io.IOException - if there are errors connecting to the cluster.
public TapStream tapDump(java.lang.String id)
throws java.io.IOException,
javax.naming.ConfigurationException
id - the named tap id that can be used to resume a disconnected tap
stream
javax.naming.ConfigurationException - a bad configuration was received from the
memcached cluster.
java.io.IOException - If there are errors connecting to the cluster.public void shutdown()
public long getMessagesRead()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||