Trait

scala.pickling

Hintable

Related Doc: package pickling

Permalink

trait Hintable extends AnyRef

Hintable defines the interface used between picklers and formats to "aide' in creating clean/efficient formats.

The FULL features picklers allow: - eliding statically known types - structural sharing of data - possible binary size optimizations (using jvm sizes)

Obviously not all picklers will use these mechanisms.


Size Optimization

If a pickler/unpickler calls hintKnownSize, it's talking about a binary size of the following entry. ----

Type Optimization

If a pickler/unpickler call hintElidedType, it's allowing the underlying format to 'drop' the forced storage of a type tag. ----

Structural Sharing

If a pickler/unpickler calls hintOid, it's telling the underlying format that this particular pickler entry shares it structure with the same entry of that number.

Currently, rather than using known tags, picklers assume a per-pickle ordinal associated with each entry. This ordinal should be automatically tracked and restored.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hintable
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def hintElidedType(tag: FastTypeTag[_]): Hintable.this.type

    Permalink

    Hints to the pickle format that we KNOW the type of this field, so it can elide any type hints from the final pickle.

    Hints to the pickle format that we KNOW the type of this field, so it can elide any type hints from the final pickle. During unpickling, this informs the format that it shouldn't look for any type hints in the pickle, but instead use this tag as the unpickle tag key.

  2. abstract def hintKnownSize(knownSize: Int): Hintable.this.type

    Permalink

    Hints at the expected (byte) size of the entry we're about to write..

  3. abstract def hintOid(id: Int): Hintable.this.type

    Permalink

    Hints the object id of the next beginEntry/endEntry calls.

    Hints the object id of the next beginEntry/endEntry calls. If this oid is -1, it implies that the next entry has not been registered in any sharing cache, and should be pickled fully. If the oid != -1, then the pickle format is free to elide the fields of the entry in favor of pickling a scala.pickling.refs.Ref.

    Hint: This is only used during pickling.

  4. abstract def pinHints(): Hintable.this.type

    Permalink

    Locks the hints down to what we've specified, so if you drop into another pickler it retains our information.

  5. abstract def popHints(): Hintable.this.type

    Permalink

    Pops to the previously saved set of hints.

  6. abstract def pushHints(): Hintable.this.type

    Permalink

    Creates a new fresh set of hints, preserving what was hinted before.

  7. abstract def unpinHints(): Hintable.this.type

    Permalink

    Unlocks the hints.

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. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped