com.twitter.finagle.kestrel

ConnectedClient

class ConnectedClient extends ClientBase[Service[Command, Response], Response, Unit]

A Client representing a single TCP connection to a single server.

Attributes
protected
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ConnectedClient
  2. ClientBase
  3. Client
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ConnectedClient(underlying: ServiceFactory[Command, Response])

    underlying

    a MemcacheClientFactory that wraps a ServiceFactory[Command, Response].

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def close(): Unit

    Close any consume resources such as TCP Connections.

    Close any consume resources such as TCP Connections. This should will not release resources created by the from() and to() methods; it is the responsibility of the caller to release those resources directly.

    Definition Classes
    ClientBaseClient
  9. def delete(queueName: String): Future[Response]

    Delete a queue.

    Delete a queue. Removes the journal file on the remote server.

    Definition Classes
    ConnectedClientClient
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def flush(queueName: String): Future[Response]

    Flush a queue.

    Flush a queue. Empties all items from the queue without deleting the journal.

    Definition Classes
    ConnectedClientClient
  14. def get(queueName: String, waitUpTo: Duration = 0.seconds): Future[Option[ChannelBuffer]]

    Dequeue an item.

    Dequeue an item.

    waitUpTo

    if the queue is empty, indicate to the Kestrel server how long to block the operation, waiting for something to arrive, before returning None. 0.seconds (the default) means no waiting, as opposed to infinite wait.

    Definition Classes
    ConnectedClientClient
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def read(queueName: String): ReadHandle

    Read indefinitely from the given queue with transactions.

    Read indefinitely from the given queue with transactions. Note that {{read}} will reserve a connection for the duration of the read. Note that this does no buffering: we await acknowledment (through synchronizing on ReadMessage.ack) before acknowledging that message to the kestrel server & reading the next one.

    returns

    A read handle.

    Definition Classes
    ConnectedClientClient
  22. def read(processResponse: (Response) ⇒ Try[Option[(ChannelBuffer, Unit)]], openCommand: (Service[Command, Response]) ⇒ Future[Response], closeAndOpenCommand: (Unit) ⇒ (Service[Command, Response]) ⇒ Future[Response], abortCommand: (Unit) ⇒ (Service[Command, Response]) ⇒ Future[Response]): ReadHandle

    Read indefinitely from a underlying service

    Read indefinitely from a underlying service

    processResponse

    function to process a raw reply into: Return(Some()) successful read of a single item, Return(None) successful read of zero items, or Throw() invalid reply

    openCommand

    the command to open a read

    closeAndOpenCommand

    the command to ack and open a read

    abortCommand

    the command to abort a read

    returns

    a ReadHandle

    Attributes
    protected
    Definition Classes
    ClientBase
  23. def readReliably(queueName: String): ReadHandle

    {{readReliably}} with infinite, 0-second backoff retries.

    {{readReliably}} with infinite, 0-second backoff retries.

    Definition Classes
    Client
  24. def readReliably(queueName: String, timer: Timer, retryBackoffs: ⇒ Stream[Duration]): ReadHandle

    Read from a queue reliably: retry streaming reads on failure (which may indeed be backed by multiple kestrel hosts).

    Read from a queue reliably: retry streaming reads on failure (which may indeed be backed by multiple kestrel hosts). This presents to the user a virtual "reliable" stream of messages, and errors are transparent.

    queueName

    the queue to read from

    timer

    a timer used to delay retries

    retryBackoffs

    a (possibly infinite) stream of durations comprising a backoff policy

    Note: the use of call-by-name for the stream is in order to ensure that we do not suffer a space leak for infinite retries.

    Definition Classes
    Client
  25. def set(queueName: String, value: ChannelBuffer, expiry: Time = Time.epoch): Future[Response]

    Enqueue an item.

    Enqueue an item.

    expiry

    how long the item is valid for (Kestrel will delete the item if it isn't dequeued in time). Time.epoch (0) means the item will never expire.

    Definition Classes
    ConnectedClientClient
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def write(queueName: String, offer: Offer[ChannelBuffer]): Future[Throwable]

    Write indefinitely to the given queue.

    Write indefinitely to the given queue. The given offer is synchronized on indefinitely, writing the items as they become available. Unlike {{read}}, {{write}} does not reserve a connection.

    returns

    a Future indicating client failure.

    Definition Classes
    ClientBaseClient

Inherited from ClientBase[Service[Command, Response], Response, Unit]

Inherited from Client

Inherited from AnyRef

Inherited from Any

Ungrouped