Class TapStream

java.lang.Object
net.spy.memcached.tapmessage.TapStream

public class TapStream extends Object
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
    Modifier and Type
    Field
    Description
    private final List<TapOperation>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new TapStream which will be used by a TapClient to handle incoming TAP operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add an operation to the stream of TAP messages which have been sent to the server.
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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

      public void addOp(TapOperation op)
      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 -