Package

com.twitter.finagle

kestrel

Permalink

package kestrel

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. kestrel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Client extends AnyRef

    Permalink

    A friendly Kestrel client Interface.

  2. abstract class ClientBase[CommandExecutor <: Closable, Reply, ItemId] extends Client

    Permalink

    Common base class for clients using different protocols

    Common base class for clients using different protocols

    CommandExecutor

    the type that executes commands using some protocol

    Reply

    the type of reply that {{CommandExecutor}} returns

    ItemId

    the type used by {{CommandExecutor}} to identify returned items

    Attributes
    protected
  3. abstract class CommandExecutorFactory[U] extends Closable

    Permalink

    Factory of command executors for com.twitter.finagle.kestrel.ClientBase

    Factory of command executors for com.twitter.finagle.kestrel.ClientBase

    U

    the type used to execute commands in com.twitter.finagle.kestrel.ClientBase.read

    Attributes
    protected
  4. class ConnectedClient extends ClientBase[Service[Command, Response], Response, Unit]

    Permalink

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

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

    Attributes
    protected
  5. class FinagledClientFactory extends CommandExecutorFactory[FinagledClosableClient]

    Permalink

    Wrapper factory for creating FinagledClosableClients

    Wrapper factory for creating FinagledClosableClients

    Attributes
    protected
  6. class FinagledClosableClient extends FinagledClient with Closable

    Permalink

    Extends FinagledClient with Closable

    Extends FinagledClient with Closable

    Attributes
    protected
  7. class InterpreterService extends Service[Command, Response]

    Permalink
  8. abstract class MultiReaderBuilder[Req, Rep, Builder] extends AnyRef

    Permalink

    Factory for com.twitter.finagle.kestrel.ReadHandle instances.

  9. class MultiReaderBuilderMemcache extends MultiReaderBuilderMemcacheBase[MultiReaderBuilderMemcache]

    Permalink

    Factory for com.twitter.finagle.kestrel.ReadHandle instances using Kestrel's memcache protocol.

  10. abstract class MultiReaderBuilderMemcacheBase[Builder] extends MultiReaderBuilder[Command, Response, Builder]

    Permalink
  11. class MultiReaderBuilderThrift extends MultiReaderBuilder[ThriftClientRequest, Array[Byte], MultiReaderBuilderThrift]

    Permalink

    Factory for com.twitter.finagle.kestrel.ReadHandle instances using Kestrel's thriftmux protocol.

  12. class MultiReaderBuilderThriftMux extends MultiReaderBuilder[ThriftClientRequest, Array[Byte], MultiReaderBuilderThriftMux]

    Permalink

    Factory for com.twitter.finagle.kestrel.ReadHandle instances using Kestrel's thriftmux protocol.

  13. final case class MultiReaderConfig[Req, Rep] extends Product with Serializable

    Permalink

    Multi reader configuration settings

  14. abstract class ReadHandle extends AnyRef

    Permalink

    An ongoing transactional read (from {{read}}).

    An ongoing transactional read (from {{read}}).

    A common usage pattern is to attach asynchronous handlers to messages and error by invoking Offer.foreach on them. For example:

    val readHandle: ReadHandle = ...
    readHandle.messages.foreach { msg =>
      try {
        System.out.println(msg.bytes.toString("UTF-8"))
      } finally {
        msg.ack() // if we don't do this, no more msgs will come to us
      }
    }
    readHandle.error.foreach { System.error.println("zomg! got an error " + _.getMessage) }
  15. case class ReadMessage(bytes: Buf, ack: Offer[Unit], abort: Offer[Unit] = Offer.const(Unit)) extends Product with Serializable

    Permalink

    A message that has been read: consists of the message itself, and an offer to acknowledge.

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

    Permalink

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

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

    Attributes
    protected
  17. class ClusterMultiReaderBuilder extends MultiReaderBuilderMemcacheBase[ClusterMultiReaderBuilder]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 6.15.1) Use MultiReaderBuilderMemcache instead

  18. final case class ClusterMultiReaderConfig extends Product with Serializable

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 6.15.1) Use MultiReaderConfig[Req, Rep] instead

Value Members

  1. object AllHandlesDiedException extends Exception

    Permalink

    Indicates that all ReadHandles that are backing a given com.twitter.finagle.kestrel.MultiReader have died.

  2. object Client

    Permalink
  3. object ConnectedClient

    Permalink
  4. object MultiReaderMemcache

    Permalink

    Read from multiple clients in round-robin fashion, "grabby hands" style using Kestrel's memcache protocol.

    Read from multiple clients in round-robin fashion, "grabby hands" style using Kestrel's memcache protocol. The load balancing is simple, and falls out naturally from the user of the {{Offer}} mechanism: When there are multiple available messages, round-robin across them. Otherwise, wait for the first message to arrive.

    Example with a custom client builder:

    val readHandle =
      MultiReaderMemcache("/the/path", "the-queue")
        .clientBuilder(
          ClientBuilder()      /* etc... but do not set hosts or build */
            .stack(Kestrel.client
              .withSession.acquisitionTimeout(1.minute)
              .withRequestTimeout(1.minute)
              .withSessionPool.maxValue(1)))
        .retryBackoffs(/* Stream[Duration], Timer; optional */)
        .build()
  5. object MultiReaderThrift

    Permalink
  6. object MultiReaderThriftMux

    Permalink

    Read from multiple clients in round-robin fashion, "grabby hands" style using Kestrel's memcache protocol.

    Read from multiple clients in round-robin fashion, "grabby hands" style using Kestrel's memcache protocol. The load balancing is simple, and falls out naturally from the user of the {{Offer}} mechanism: When there are multiple available messages, round-robin across them. Otherwise, wait for the first message to arrive.

    Example with a custom client builder:

    val readHandle =
      MultiReaderThriftMux("/the/path", "the-queue")
        .clientBuilder(
          ClientBuilder()
            .stack(ThriftMux.client
              .withClientId(ClientId("myClientName"))
              .withSession.acquisitionTimeout(1.minute)
              .withRequestTimeout(1.minute))
        .retryBackoffs(/* Stream[Duration], Timer; optional */)
        .build()

    Example without a customer client builder so clientId passed to apply

    val name: com.twitter.finagle.Name = Resolver.eval(...)
    val va: Var[Addr] = name.bind()
    val readHandle =
      MultiReaderThriftMux(va, "the-queue", ClientId("myClientName"))
        .retryBackoffs(/* Stream[Duration], Timer; optional */)
        .build()
  7. object OutOfRetriesException extends Exception

    Permalink

    Indicates that a com.twitter.finagle.kestrel.ReadHandle has exceeded its retry budget.

  8. object ReadClosedException extends Exception

    Permalink

    Indicates that a com.twitter.finagle.kestrel.ReadHandle has been closed.

  9. object ReadHandle

    Permalink
  10. package java

    Permalink
  11. package net

    Permalink
  12. package protocol

    Permalink

Deprecated Value Members

  1. object MultiReader

    Permalink

    Read from multiple clients in round-robin fashion, "grabby hands" style.

    Read from multiple clients in round-robin fashion, "grabby hands" style. The load balancing is simple, and falls out naturally from the user of the {{Offer}} mechanism: When there are multiple available messages, round-robin across them. Otherwise, wait for the first message to arrive.

    Var[Addr] example:

    val name: com.twitter.finagle.Name = Resolver.eval(...)
    val va: Var[Addr] = name.bind()
    val readHandle =
      MultiReader(va, "the-queue")
        .clientBuilder(
          ClientBuilder()      /* etc... but do not set hosts or build */
            .stack(Kestrel.client
              .withSession.acquisitionTimeout(1.minute)
              .withRequestTimeout(1.minute)
              .withSessionPool.maxSize(1)))
        .retryBackoffs(/* Stream[Duration], Timer; optional */)
        .build()
    Annotations
    @deprecated
    Deprecated

    (Since version 6.15.1) Use MultiReaderMemcache or MultiReaderThriftMux instead

Inherited from AnyRef

Inherited from Any

Ungrouped