c

quasar.precog.common.Codec

CompositeCodec

case class CompositeCodec[A, B, C](codecA: Codec[A], codecB: Codec[B], from: (C) ⇒ (A, B), to: (A, B) ⇒ C) extends Codec[C] with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Codec[C], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompositeCodec
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Codec
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompositeCodec(codecA: Codec[A], codecB: Codec[B], from: (C) ⇒ (A, B), to: (A, B) ⇒ C)

Type Members

  1. type S = Either[(Codec.S, B), Codec.S]
    Definition Classes
    CompositeCodecCodec

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. def as[B](to: (B) ⇒ C, from: (C) ⇒ B): Codec[B]
    Definition Classes
    Codec
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. val codecA: Codec[A]
  8. val codecB: Codec[B]
  9. def encodedSize(c: C): Int

    Returns the exact encoded size of a.

    Returns the exact encoded size of a.

    Definition Classes
    CompositeCodecCodec
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. val from: (C) ⇒ (A, B)
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def maxSize(c: C): Int

    Returns an upper bound on the size of a.

    Returns an upper bound on the size of a.

    Definition Classes
    CompositeCodecCodec
  16. def minSize(c: C): Int

    Returns a lower bound on the space required in a buffer so that a can be written.

    Returns a lower bound on the space required in a buffer so that a can be written.

    Definition Classes
    CompositeCodecCodec
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def read(buf: ByteBuffer): C

    Reads a value of type A from buffer.

    Reads a value of type A from buffer. This should generally follow the contract that writeUnsafe(a, buffer); read(buffer) == a.

    Definition Classes
    CompositeCodecCodec
  21. def skip(buf: ByteBuffer): Unit

    This is similar to read(buffer), except that a value does not actually need to be returned.

    This is similar to read(buffer), except that a value does not actually need to be returned.

    Definition Classes
    CompositeCodecCodec
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. val to: (A, B) ⇒ C
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  27. def write[M[_]](a: C)(implicit M: ByteBufferMonad[M]): M[Unit]

    Writes a using a ByteBufferMonad.

    Writes a using a ByteBufferMonad. This is much slower than just using writeInit/writeMore.

    Definition Classes
    Codec
  28. def writeAll(a: C)(acquire: () ⇒ ByteBuffer, used: List[ByteBuffer] = Nil): List[ByteBuffer]

    Writes a entirely to a series of ByteBuffers returned by acquire.

    Writes a entirely to a series of ByteBuffers returned by acquire. The returned set of ByteBuffers is in reverse order, so that calls to writeAll can be chained by passing in the previous result to used.

    Definition Classes
    Codec
  29. def writeInit(c: C, buf: ByteBuffer): Option[S]

    Initiate a write.

    Initiate a write. If a is successfully written (in its entirety) to buffer, then None is returned. Otherwise, Some(s) is returned, indicating that some more data (ie. s) still needs to be written using writeMore(s, _). This last condition will normally happen when we run out of space in the buffer, so a was only partially written.

    Definition Classes
    CompositeCodecCodec
  30. def writeMore(more: S, buf: ByteBuffer): Option[S]

    Writes the remaining data from a call to writeInit to buffer.

    Writes the remaining data from a call to writeInit to buffer. If this is written completely and successfully, None is returned. Otherwise, Some(s2) is returned, which contains more data to be written with writeMore.

    Definition Classes
    CompositeCodecCodec
  31. def writeUnsafe(c: C, buf: ByteBuffer): Unit

    Performs an *unsafe* write of a to buffer.

    Performs an *unsafe* write of a to buffer. This does not perform any safety checks and assumes buffer has at least encodedSize(a) bytes remaining. The behaviour if this is not the case is undefined.

    Definition Classes
    CompositeCodecCodec

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Codec[C]

Inherited from AnyRef

Inherited from Any

Ungrouped