Interface PersistenceUnreachableTypeHandler<M,T>
-
- Type Parameters:
M
-T
-
- All Superinterfaces:
PersistenceLegacyTypeHandler<M,T>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<M,T>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
- All Known Implementing Classes:
PersistenceUnreachableTypeHandler.Default
public interface PersistenceUnreachableTypeHandler<M,T> extends PersistenceLegacyTypeHandler<M,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<M,T>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceLegacyTypeHandler
PersistenceLegacyTypeHandler.Abstract<M,T>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
PersistenceTypeDescription.Identity
-
-
Method Summary
Modifier and Type Method Description default void
complete(M medium, T instance, PersistenceObjectIdResolver idResolver)
Completes an initially built instance after all loaded instances have been built.default T
create(M medium, PersistenceObjectIdResolver idResolver)
default boolean
hasInstanceReferences()
default void
iterateInstanceReferences(T instance, PersistenceFunction iterator)
default void
iterateLoadableReferences(M medium, PersistenceObjectIdAcceptor iterator)
static <M,T>
PersistenceUnreachableTypeHandler<M,T>New(PersistenceTypeDefinition typeDefinition)
default Class<T>
type()
default void
update(M medium, T instance, PersistenceObjectIdResolver idResolver)
-
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
toTypeIdentifier
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeHandler
allMembers, getPersistedEnumOrdinal, guaranteeSpecificInstanceViablity, guaranteeSubTypeInstanceViablity, instanceMembers, isSpecificInstanceViable, isSubTypeInstanceViable, iterateMemberTypes, membersInDeclaredOrder, settingMembers, storingMembers
-
-
-
-
Method Detail
-
hasInstanceReferences
default boolean hasInstanceReferences()
- Specified by:
hasInstanceReferences
in interfacePersistenceTypeHandler<M,T>
-
iterateInstanceReferences
default void iterateInstanceReferences(T instance, PersistenceFunction iterator)
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<M,T>
-
iterateLoadableReferences
default void iterateLoadableReferences(M medium, PersistenceObjectIdAcceptor iterator)
- Specified by:
iterateLoadableReferences
in interfacePersistenceTypeHandler<M,T>
-
type
default Class<T> type()
- Specified by:
type
in interfacePersistenceTypeDefinition
- Specified by:
type
in interfacePersistenceTypeHandler<M,T>
- Specified by:
type
in interfacePersistenceTypeLink
-
create
default T create(M medium, PersistenceObjectIdResolver idResolver)
- Specified by:
create
in interfacePersistenceTypeHandler<M,T>
-
update
default void update(M medium, T instance, PersistenceObjectIdResolver idResolver)
- Specified by:
update
in interfacePersistenceTypeHandler<M,T>
-
complete
default void complete(M medium, T instance, PersistenceObjectIdResolver idResolver)
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<M,T>
-
New
static <M,T> PersistenceUnreachableTypeHandler<M,T> New(PersistenceTypeDefinition typeDefinition)
-
-