All Known Implementing Classes:
AbstractObjType, AbstractObjType.AbstractUncachedObjType

public interface ObjType
  • Field Details

  • Method Details

    • name

      String name()
      Human-readable name.
    • id

      String id()
      Must be unique among all registered object types.
    • targetClass

      Class<? extends Obj> targetClass()
      The target class that objects of this type should be serialized from and deserialized to.
    • cachedObjectExpiresAtMicros

      default long cachedObjectExpiresAtMicros(Obj obj, LongSupplier clockMicros)
      Allows an object type to define how long a particular object instance can be cached.

      -1L, which is the default implementation, defines that an object instance can be cached forever.

      0L defines that an object instance must never be cached.

      A positive value defines the timestamp in "microseconds since epoch" when the cached object can be evicted

    • negativeCacheExpiresAtMicros

      default long negativeCacheExpiresAtMicros(LongSupplier clockMicros)
      Allows an object type to define how long the fact of a non-existing object instance can be cached.

      -1L defines that an object instance can be cached forever.

      0L, which is the default implementation, defines that an object instance must never be cached.

      A positive value defines the timestamp in "microseconds since epoch" when the negative-cache sentinel can be evicted