com.twitter.finagle

Stack

Related Docs: trait Stack | package finagle

object Stack

See also

stack.nilStack for starting construction of an empty stack for ServiceFactorys.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Stack
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Head extends AnyRef

    Trait encompassing all associated metadata of a stack element.

    Trait encompassing all associated metadata of a stack element. Stackables extend this trait.

  2. case class Leaf[T](head: Head, t: T) extends Stack[T] with Product with Serializable

    A static stack element; necessarily the last.

  3. abstract class Module[T] extends Stackable[T]

    A convenience class to construct stackable modules.

    A convenience class to construct stackable modules. This variant operates over stacks and the entire parameter map. The ModuleN variants may be more convenient for most definitions as they operate over T types and the parameter extraction is derived from type parameters.

    def myNode = new Module[Int=>Int]("myelem") {
      val role = "Multiplier"
      val description = "Multiplies values by a multiplier"
      val parameters = Seq(implicitly[Stack.Param[Multiplied]])
      def make(params: Params, next: Stack[Int=>Int]): Stack[Int=>Int] = {
        val Multiplier(m) = params[Multiplier]
        if (m == 1) next // It's a no-op, skip it.
        else Stack.Leaf("multiply", i => next.make(params)(i)*m)
      }
    }
  4. abstract class Module0[T] extends Stackable[T]

    A module of 0 parameters.

  5. abstract class Module1[P1, T] extends Stackable[T]

    A module of 1 parameter.

  6. abstract class Module2[P1, P2, T] extends Stackable[T]

    A module of 2 parameters.

  7. abstract class Module3[P1, P2, P3, T] extends Stackable[T]

    A module of 3 parameters.

  8. abstract class Module4[P1, P2, P3, P4, T] extends Stackable[T]

    A module of 4 parameters.

  9. case class Node[T](head: Head, mk: (Params, Stack[T]) ⇒ Stack[T], next: Stack[T]) extends Stack[T] with Product with Serializable

    Nodes materialize by transforming the underlying stack in some way.

  10. trait Param[P] extends AnyRef

    A typeclass representing P-typed elements, eligible as parameters for stack configuration.

    A typeclass representing P-typed elements, eligible as parameters for stack configuration. Note that the typeclass instance itself is used as the key in parameter maps; thus typeclasses should be persistent:

    case class Multiplier(i: Int) {
      def mk(): (Multipler, Stack.Param[Multipler]) =
        (this, Multiplier.param)
    }
    object Multiplier {
      implicit val param = Stack.Param(Multiplier(123))
    }

    The mk() function together with Parameterized.configured provides a convenient Java interface.

  11. trait Parameterized[+T] extends AnyRef

    A mix-in for describing an object that is parameterized.

  12. trait Params extends Iterable[(Param[_], Any)]

    A parameter map.

  13. case class Role(name: String) extends Product with Serializable

    Base trait for Stack roles.

    Base trait for Stack roles. A stack's role is indicative of its functionality. Roles provide a way to group similarly-purposed stacks and slot stack elements into specific usages.

    TODO: CSL-869

  14. trait Transformable[+T] extends AnyRef

  15. trait Transformer extends AnyRef

    Encodes transformations for stacks of ServiceFactories of arbitrary Req and Rep types.

    Encodes transformations for stacks of ServiceFactories of arbitrary Req and Rep types. Such transformations must be indifferent to these types in order to typecheck.

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. object Leaf extends Serializable

  5. object Node extends Serializable

  6. object Param

  7. object Params

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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. final def getClass(): Class[_]

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

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

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

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

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

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped