Interface PersistenceUnreachableTypeHandler<D,T>
- Type Parameters:
D-T-
- All Superinterfaces:
PersistenceDataTypeHolder<D>,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 Class<D>dataType()default voiditerateInstanceReferences(T instance, PersistenceFunction iterator)default voiditerateLoadableReferences(D data, PersistenceReferenceLoader iterator)default <C extends Consumer<? super Class<?>>>
CiterateMemberTypes(C logic)Iterates the types of persistent members (e.g.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, storeMethods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
hasPersistedReferences, hasPersistedVariableLength, hasVaryingPersistedLengthInstances, isPrimitiveType, membersPersistedLengthMaximum, membersPersistedLengthMinimum, runtimeTypeName, toRuntimeTypeIdentifier, typeId, typeNameMethods inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
instancePrimitiveMembers, instanceReferenceMembers, toTypeIdentifierMethods inherited from interface one.microstream.persistence.types.PersistenceTypeHandler
allMembers, getPersistedEnumOrdinal, guaranteeSpecificInstanceViablity, guaranteeSubTypeInstanceViablity, initializeState, instanceMembers, isSpecificInstanceViable, isSubTypeInstanceViable, isValidEntityType, membersInDeclaredOrder, settingMembers, storingMembers, validateEntityType
-
Method Details
-
dataType
- Specified by:
dataTypein interfacePersistenceDataTypeHolder<D>- Specified by:
dataTypein interfacePersistenceTypeHandler<D,T>
-
iterateInstanceReferences
- Specified by:
iterateInstanceReferencesin interfacePersistenceTypeHandler<D,T>
-
iterateLoadableReferences
- Specified by:
iterateLoadableReferencesin interfacePersistenceTypeHandler<D,T>
-
type
- Specified by:
typein interfacePersistenceTypeDefinition- Specified by:
typein interfacePersistenceTypeHandler<D,T>- Specified by:
typein interfacePersistenceTypeLink
-
create
- Specified by:
createin interfacePersistenceTypeHandler<D,T>
-
updateState
- Specified by:
updateStatein interfacePersistenceTypeHandler<D,T>
-
complete
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>
-
iterateMemberTypes
Description copied from interface:PersistenceTypeHandlerIterates the types of persistent members (e.g. non-transientFields). The same type may occur more than once. The order in which the types are provided is undefined, i.e. depending on the implementation.- Specified by:
iterateMemberTypesin interfacePersistenceTypeHandler<D,T>
-
New
static <D, T> PersistenceUnreachableTypeHandler<D,T> New(PersistenceTypeDefinition typeDefinition)
-