Package net.spy.memcached.tapmessage
Class TapStream
java.lang.Object
net.spy.memcached.tapmessage.TapStream
Holds multiple operations put together for a tap stream.
A TapStream handles the series of messages coming back from a given node
which is sending data over TAP. The TapClient will typically manage a
set of TapStreams.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TapStream which will be used by a TapClient to handle incoming TAP operations. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOp
(TapOperation op) Add an operation to the stream of TAP messages which have been sent to the server.void
cancel()
Cancels all operations still waiting on an existing TapStream.boolean
Determine if messages sent to this server and recorded on this TapStream have been determined to be in error.boolean
Determine if messages sent to this server and recorded on this TapStream have been canceled.boolean
Check if all operations in the TapStream are completed.
-
Field Details
-
ops
-
-
Constructor Details
-
TapStream
public TapStream()Creates a new TapStream which will be used by a TapClient to handle incoming TAP operations.
-
-
Method Details
-
cancel
public void cancel()Cancels all operations still waiting on an existing TapStream. -
isCompleted
public boolean isCompleted()Check if all operations in the TapStream are completed.- Returns:
- true if all operations currently in the TapStream are completed
-
isCancelled
public boolean isCancelled()Determine if messages sent to this server and recorded on this TapStream have been canceled.- Returns:
- true if all operations on this TapStream have been canceled
-
hasErrored
public boolean hasErrored()Determine if messages sent to this server and recorded on this TapStream have been determined to be in error.- Returns:
- true if all operations on this TapStream are in an error state
-
addOp
Add an operation to the stream of TAP messages which have been sent to the server. Note this does not represent all messages, just a select few worth keeping track of. While a public method, this is not intended for general use but rather only for use when extending the TapClient which manages this TapStream.- Parameters:
op
-
-