Interface ObjType
- All Known Implementing Classes:
AbstractObjType,AbstractObjType.AbstractUncachedObjType
public interface ObjType
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault longcachedObjectExpiresAtMicros(Obj obj, LongSupplier clockMicros) Allows an object type to define how long a particular object instance can be cached.id()Must be unique among all registered object types.name()Human-readable name.default longnegativeCacheExpiresAtMicros(LongSupplier clockMicros) Allows an object type to define how long the fact of a non-existing object instance can be cached.The target class that objects of this type should be serialized from and deserialized to.
-
Field Details
-
CACHE_UNLIMITED
static final long CACHE_UNLIMITED- See Also:
-
NOT_CACHED
static final long NOT_CACHED- See Also:
-
-
Method Details
-
name
String name()Human-readable name. -
id
String id()Must be unique among all registered object types. -
targetClass
The target class that objects of this type should be serialized from and deserialized to. -
cachedObjectExpiresAtMicros
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
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
-