Interface PersistenceUnreachableTypeHandler<D,T>
-
- Type Parameters:
D
-T
-
- All Superinterfaces:
PersistenceLegacyTypeHandler<D,T>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<D,T>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
- All Known Implementing Classes:
PersistenceUnreachableTypeHandler.Default
public interface PersistenceUnreachableTypeHandler<D,T> extends PersistenceLegacyTypeHandler<D,T>
This is, of course, not a handler that is unreachable, but a handler for a type whose instances are (decided by the developer) no longer reachable in the entity graph, despite potentially still being present in a live database, but not having been cleaned up, yet. However, this effectively means that the handler itself should be kind of "unreachable", too, in the sense that it may never be necessary to access and use it. Without such a handler, a class could never be removed at the design level without replacement until the last instance of it has been cleaned up the the storage housekeeping. That is an unpleasent dependency. The preferable way is to explicitly tell the typing system to "ignore" those types. That is done by registering a kind of dummy type handler. That dummy handler is this type here.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PersistenceUnreachableTypeHandler.Default<D,T>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceLegacyTypeHandler
PersistenceLegacyTypeHandler.Abstract<D,T>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
PersistenceTypeDescription.Identity
-
-
Method Summary
Modifier and Type Method Description default void
complete(D data, T instance, PersistenceLoadHandler handler)
Completes an initially built instance after all loaded instances have been built.default T
create(D data, PersistenceLoadHandler handler)
default boolean
hasInstanceReferences()
default void
iterateInstanceReferences(T instance, PersistenceFunction iterator)
default void
iterateLoadableReferences(D data, PersistenceReferenceLoader iterator)
static <D,T>
PersistenceUnreachableTypeHandler<D,T>New(PersistenceTypeDefinition typeDefinition)
default Class<T>
type()
default void
updateState(D data, T instance, PersistenceLoadHandler handler)
-
Methods inherited from interface one.microstream.persistence.types.PersistenceLegacyTypeHandler
collectEnumConstants, initialize, store
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
hasPersistedReferences, hasPersistedVariableLength, hasVaryingPersistedLengthInstances, isPrimitiveType, membersPersistedLengthMaximum, membersPersistedLengthMinimum, runtimeTypeName, toRuntimeTypeIdentifier, typeId, typeName
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
instancePrimitiveMembers, instanceReferenceMembers, toTypeIdentifier
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeHandler
allMembers, getPersistedEnumOrdinal, guaranteeSpecificInstanceViablity, guaranteeSubTypeInstanceViablity, initializeState, instanceMembers, isSpecificInstanceViable, isSubTypeInstanceViable, iterateMemberTypes, membersInDeclaredOrder, settingMembers, storingMembers
-
-
-
-
Method Detail
-
hasInstanceReferences
default boolean hasInstanceReferences()
- Specified by:
hasInstanceReferences
in interfacePersistenceTypeHandler<D,T>
-
iterateInstanceReferences
default void iterateInstanceReferences(T instance, PersistenceFunction iterator)
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<D,T>
-
iterateLoadableReferences
default void iterateLoadableReferences(D data, PersistenceReferenceLoader iterator)
- Specified by:
iterateLoadableReferences
in interfacePersistenceTypeHandler<D,T>
-
type
default Class<T> type()
- Specified by:
type
in interfacePersistenceTypeDefinition
- Specified by:
type
in interfacePersistenceTypeHandler<D,T>
- Specified by:
type
in interfacePersistenceTypeLink
-
create
default T create(D data, PersistenceLoadHandler handler)
- Specified by:
create
in interfacePersistenceTypeHandler<D,T>
-
updateState
default void updateState(D data, T instance, PersistenceLoadHandler handler)
- Specified by:
updateState
in interfacePersistenceTypeHandler<D,T>
-
complete
default void complete(D data, T instance, PersistenceLoadHandler handler)
Description copied from interface:PersistenceTypeHandler
Completes an initially built instance after all loaded instances have been built. E.g. can be used to cause a hash collection to hash all its initially collected entries after their instances have been built.- Specified by:
complete
in interfacePersistenceTypeHandler<D,T>
-
New
static <D,T> PersistenceUnreachableTypeHandler<D,T> New(PersistenceTypeDefinition typeDefinition)
-
-