ml.combust.bundle.serializer.custom

CustomType

trait CustomType[T] extends AnyRef

Type class for a custom object.

Custom objects can be serialized in an ml.combust.bundle.dsl.AttributeList as an ml.combust.bundle.dsl.Value. They must provide a JSON serialization as well as a compact byte representation.

T

Scala class of custom type

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

Abstract Value Members

  1. abstract def format: RootJsonFormat[T]

    Get the Spray JSON format for the custom type.

    Get the Spray JSON format for the custom type.

    This is the formatter used for serializing/deserializing the custom type with JSON.

    returns

    Spray JSON format

  2. abstract def fromBytes(bytes: Array[Byte]): T

    Convert compact bytes to custom object.

    Convert compact bytes to custom object.

    bytes

    compact byte array

    returns

    deserialized custom object

  3. abstract def name: String

    Get name of the custom type.

    Get name of the custom type.

    This can be anything as long as it is unique among custom types

    returns

    name of the custom type

  4. abstract def toBytes(obj: T): Array[Byte]

    Convert custom object to compact byte array.

    Convert custom object to compact byte array.

    obj

    custom object

    returns

    compact byte array serialization of obj

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 bytesSerializer: CustomBytesSerializer[T]

    Get compact byte serializer.

    Get compact byte serializer.

    returns

    compact byte serializer for custom object

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def formatSerializer(implicit format: HasConcreteSerializationFormat): CustomSerializer[T]

    Get custom object serializer specific to implicit ml.combust.bundle.serializer.ConcreteSerializationFormat.

    Get custom object serializer specific to implicit ml.combust.bundle.serializer.ConcreteSerializationFormat.

    format

    concrete serialization format determines which serializer to return

    returns

    custom object serializer for given concrete format

  13. def fromJsonBytes(bytes: Array[Byte]): T

    Convert byte array of JSON to custom object.

    Convert byte array of JSON to custom object.

    bytes

    JSON byte array

    returns

    deserialized custom object

  14. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  17. def isLarge(obj: T): Boolean

    Whether or not this object is large when serialized.

    Whether or not this object is large when serialized.

    obj

    custom object

    returns

    true if large byte size when serialized, false otherwise

  18. def isSmall(obj: T): Boolean

    Whether or not this object is small when serialized.

    Whether or not this object is small when serialized.

    obj

    custom object

    returns

    true if small byte size when serialized, false otherwise

  19. def jsonSerializer: CustomJsonSerializer[T]

    Get JSON serializer.

    Get JSON serializer.

    returns

    JSON serialize for custom object

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

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

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

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

    Definition Classes
    AnyRef
  24. def toJsonBytes(obj: T): Array[Byte]

    Convert object to byte array of JSON.

    Convert object to byte array of JSON.

    obj

    custom object

    returns

    byte array of JSON

  25. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped