Object/Trait

com.twitter.finagle

Stack

Related Docs: trait Stack | package finagle

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. trait Head extends AnyRef

    Permalink

    Trait encompassing all associated metadata of a stack element.

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

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

    Permalink

    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. ModuleParams is similar, except it requires parameters to be declared.

    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)
      }
    }
  3. abstract class Module0[T] extends Stackable[T]

    Permalink

    A module of 0 parameters.

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

    Permalink

    A module of 1 parameter.

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

    Permalink

    A module of 2 parameters.

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

    Permalink

    A module of 3 parameters.

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

    Permalink

    A module of 4 parameters.

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

    Permalink

    A module of 5 parameters.

  9. abstract class Module6[P1, P2, P3, P4, P5, P6, T] extends Stackable[T]

    Permalink

    A module of 6 parameters.

  10. abstract class ModuleParams[T] extends Stackable[T]

    Permalink
  11. class NoOpModule[T] extends Module0[T]

    Permalink
  12. trait Param[P] extends AnyRef

    Permalink

    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.

  13. trait Parameterized[+T] extends AnyRef

    Permalink

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

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

    Permalink

    A parameter map.

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

    Permalink

    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.

  16. trait Transformable[+T] extends AnyRef

    Permalink
  17. trait Transformer extends AnyRef

    Permalink

    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

    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. object Param

    Permalink
  5. object Params

    Permalink
  6. final def asInstanceOf[T0]: T0

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

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

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

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

    Permalink
    Definition Classes
    Any
  14. def leaf[T](_role: Role, t: T): Stack[T]

    Permalink

    If only a role is given when constructing a leaf, then the head is created automatically

  15. def leaf[T](head: Head, t: T): Stack[T]

    Permalink

    A static stack element; necessarily the last.

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def node[T](head: Head, mk: (T) ⇒ T, next: Stack[T]): Stack[T]

    Permalink

    A constructor for a 'simple' Node.

  18. def node[T](head: Head, mk: (Params, Stack[T]) ⇒ Stack[T], next: Stack[T]): Stack[T]

    Permalink

    Nodes materialize by transforming the underlying stack in some way.

  19. final def notify(): Unit

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped