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 classPersistenceUnreachableTypeHandler.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 voidcomplete(D data, T instance, PersistenceLoadHandler handler)Completes an initially built instance after all loaded instances have been built.default Tcreate(D data, PersistenceLoadHandler handler)default booleanhasInstanceReferences()default voiditerateInstanceReferences(T instance, PersistenceFunction iterator)default voiditerateLoadableReferences(D data, PersistenceReferenceLoader iterator)static <D,T>
PersistenceUnreachableTypeHandler<D,T>New(PersistenceTypeDefinition typeDefinition)default Class<T>type()default voidupdateState(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:
hasInstanceReferencesin interfacePersistenceTypeHandler<D,T>
-
iterateInstanceReferences
default void iterateInstanceReferences(T instance, PersistenceFunction iterator)
- Specified by:
iterateInstanceReferencesin interfacePersistenceTypeHandler<D,T>
-
iterateLoadableReferences
default void iterateLoadableReferences(D data, PersistenceReferenceLoader iterator)
- Specified by:
iterateLoadableReferencesin interfacePersistenceTypeHandler<D,T>
-
type
default Class<T> type()
- Specified by:
typein interfacePersistenceTypeDefinition- Specified by:
typein interfacePersistenceTypeHandler<D,T>- Specified by:
typein interfacePersistenceTypeLink
-
create
default T create(D data, PersistenceLoadHandler handler)
- Specified by:
createin interfacePersistenceTypeHandler<D,T>
-
updateState
default void updateState(D data, T instance, PersistenceLoadHandler handler)
- Specified by:
updateStatein interfacePersistenceTypeHandler<D,T>
-
complete
default void complete(D data, T instance, PersistenceLoadHandler handler)
Description copied from interface:PersistenceTypeHandlerCompletes 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:
completein interfacePersistenceTypeHandler<D,T>
-
New
static <D,T> PersistenceUnreachableTypeHandler<D,T> New(PersistenceTypeDefinition typeDefinition)
-
-