com.twitter.finagle.Stack

Module

abstract class Module[T] extends Stackable[T]

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)
}
}
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Module
  2. Stackable
  3. Head
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Module()

Abstract Value Members

  1. abstract def description: String

    The description of the functionality of the element.

    The description of the functionality of the element.

    Definition Classes
    Head
  2. abstract def make(params: Params, next: Stack[T]): Stack[T]

  3. abstract def parameters: Seq[Param[_]]

    The Params that the element is interested in.

    The Params that the element is interested in.

    Definition Classes
    Head
  4. abstract def role: Role

    The Role that the element can serve.

    The Role that the element can serve.

    Definition Classes
    Head

Concrete 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. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

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

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

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

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

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

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

    Definition Classes
    AnyRef
  18. def toStack(next: Stack[T]): Stack[T]

    Definition Classes
    ModuleStackable
  19. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Stackable[T]

Inherited from Head

Inherited from AnyRef

Inherited from Any

Ungrouped