Trait/Object

com.twitter.bijection

Pivot

Related Docs: object Pivot | package bijection

Permalink

trait Pivot[K, K1, K2] extends Bijection[Iterable[K], Map[K1, Iterable[K2]]]

Pivot is useful in moving from a 1D space of K to a 2D mapping space of K1 x K2. If the elements within the K space have many repeated elements -- imagine the "time" component of a Key in a timeseries key-value store -- pivoting the changing component into an inner K2 while leaving the repeated component in an outer K1 can assist in compressing a datastore's space requirements.

Type Parameters:

K: Original Key K1: Outer Key K2: Inner Key

Trivial: Pivot[(Event, Timestamp), Event, Timestamp] would pivot the timestamp component out of a compound key.

Linear Supertypes
Bijection[Iterable[K], Map[K1, Iterable[K2]]], Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Pivot
  2. Bijection
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def pivot: Bijection[K, (K1, K2)]

    Permalink

Concrete 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. def andThen[C](g: (Map[K1, Iterable[K2]]) ⇒ C): (Iterable[K]) ⇒ C

    Permalink
    Definition Classes
    Bijection
  5. def andThen[C](g: Injection[Map[K1, Iterable[K2]], C]): Injection[Iterable[K], C]

    Permalink
    Definition Classes
    Bijection
  6. def andThen[C](g: Bijection[Map[K1, Iterable[K2]], C]): Bijection[Iterable[K], C]

    Permalink

    Composes two instances of Bijection in a new Bijection, with this one applied first.

    Composes two instances of Bijection in a new Bijection, with this one applied first.

    Definition Classes
    Bijection
  7. def andThenPivot[K3, K4](after: Bijection[(K1, K2), (K3, K4)]): Pivot[K, K3, K4]

    Permalink
  8. def apply(pairs: Iterable[K]): Map[K1, Iterable[K2]]

    Permalink
    Definition Classes
    PivotBijection
  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compose[T](g: (T) ⇒ Iterable[K]): (T) ⇒ Map[K1, Iterable[K2]]

    Permalink
    Definition Classes
    Bijection
  12. def compose[T](g: Injection[T, Iterable[K]]): Injection[T, Map[K1, Iterable[K2]]]

    Permalink
    Definition Classes
    Bijection
  13. def compose[T](g: Bijection[T, Iterable[K]]): Bijection[T, Map[K1, Iterable[K2]]]

    Permalink

    Composes two instances of Bijection in a new Bijection, with this one applied last.

    Composes two instances of Bijection in a new Bijection, with this one applied last.

    Definition Classes
    Bijection
  14. def composePivot[T](before: Bijection[T, K]): Pivot[T, K1, K2]

    Permalink
  15. lazy val decoder: PivotDecoder[K, K1, K2]

    Permalink
  16. lazy val encoder: PivotEncoder[K, K1, K2]

    Permalink
  17. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def inverse: Bijection[Map[K1, Iterable[K2]], Iterable[K]]

    Permalink
    Definition Classes
    Bijection
  23. def invert(m: Map[K1, Iterable[K2]]): Iterable[K]

    Permalink
    Definition Classes
    PivotBijection
  24. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  28. def split[V](fn: (K) ⇒ V): (K1) ⇒ (K2) ⇒ V

    Permalink
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toFunction: (Iterable[K]) ⇒ Map[K1, Iterable[K2]]

    Permalink
    Definition Classes
    Bijection
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def unsplit[V](fn: (K1) ⇒ (K2) ⇒ V): (K) ⇒ V

    Permalink
  33. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def withValue[V]: Pivot[(K, V), K1, (K2, V)]

    Permalink

    Returns a new pivot that converts an Iterable of (K, V) to an Iterable of (K1, Iterable[(K2, V)]).

    Returns a new pivot that converts an Iterable of (K, V) to an Iterable of (K1, Iterable[(K2, V)]). This is useful for pivoting multiple (K, V) pairs into a single key in some KV store.

  37. def wrapOuter[T]: Pivot[(K, T), (K1, T), K2]

    Permalink

    Returns a new Pivot that converts an Iterable of (K, T) to an Iterable of ((K1, T), Iterable[K2]).

    Returns a new Pivot that converts an Iterable of (K, T) to an Iterable of ((K1, T), Iterable[K2]). This is useful for applying a new pivoting scheme on top of this one while maintaining some outer key component.

Inherited from Bijection[Iterable[K], Map[K1, Iterable[K2]]]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped