Class

com.twitter.finagle.kestrel

ThriftConnectedClient

Related Doc: package kestrel

Permalink

class ThriftConnectedClient extends ClientBase[FinagledClosableClient, Seq[Item], Long]

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

Attributes
protected
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ThriftConnectedClient
  2. ClientBase
  3. Client
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ThriftConnectedClient(underlying: FinagledClientFactory, txnAbortTimeout: Duration)

    Permalink

    underlying

    a FinagledClientFactory that wraps a ServiceFactory[ThriftClientRequest, Array[Byte] ].

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

    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
  7. def delete(queueName: String): Future[Response]

    Permalink

    Delete a queue.

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

    Definition Classes
    ThriftConnectedClientClient
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Flush a queue.

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

    Definition Classes
    ThriftConnectedClientClient
  12. def get(queueName: String, waitUpTo: Duration = 0.seconds): Future[Option[Buf]]

    Permalink

    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
    ThriftConnectedClientClient
  13. final def getClass(): Class[_]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

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

    Permalink

    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
    ThriftConnectedClientClient
  20. def read(processResponse: (Seq[Item]) ⇒ Try[Option[(Buf, Long)]], openCommand: (FinagledClosableClient) ⇒ Future[Seq[Item]], closeAndOpenCommand: (Long) ⇒ (FinagledClosableClient) ⇒ Future[Seq[Item]], abortCommand: (Long) ⇒ (FinagledClosableClient) ⇒ Future[Seq[Item]]): ReadHandle

    Permalink

    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
  21. def readReliably(queueName: String): ReadHandle

    Permalink

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

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

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

    Permalink

    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
  23. def set(queueName: String, value: Buf, expiry: Time = Time.epoch): Future[Response]

    Permalink

    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
    ThriftConnectedClientClient
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

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

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

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

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

    Permalink

    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[FinagledClosableClient, Seq[Item], Long]

Inherited from Client

Inherited from AnyRef

Inherited from Any

Ungrouped