Class BinaryHandlerAbstractType<T>
- java.lang.Object
-
- one.microstream.persistence.types.PersistenceTypeHandler.Abstract<Binary,T>
-
- one.microstream.persistence.binary.types.BinaryTypeHandler.Abstract<T>
-
- one.microstream.persistence.binary.internal.AbstractBinaryHandlerTrivial<T>
-
- one.microstream.persistence.binary.internal.BinaryHandlerAbstractType<T>
-
- All Implemented Interfaces:
BinaryTypeHandler<T>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<Binary,T>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
public final class BinaryHandlerAbstractType<T> extends AbstractBinaryHandlerTrivial<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.types.BinaryTypeHandler
BinaryTypeHandler.Abstract<T>
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
PersistenceTypeDefinition.Default
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
PersistenceTypeDescription.Identity
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeHandler
PersistenceTypeHandler.Abstract<M,T>
-
-
Constructor Summary
Constructors Constructor Description BinaryHandlerAbstractType()
-
Method Summary
Modifier and Type Method Description T
create(Binary bytes, PersistenceObjectIdResolver idResolver)
void
guaranteeSpecificInstanceViablity()
Guarantees that thePersistenceTypeHandler
implementation is actually viably usable to handle instances.boolean
isSpecificInstanceViable()
static <T> BinaryHandlerAbstractType<T>
New(Class<T> type)
static <T> BinaryHandlerAbstractType<T>
New(Class<T> type, String typeName)
void
store(Binary bytes, T instance, long objectId, PersistenceStoreHandler handler)
void
update(Binary bytes, T instance, PersistenceObjectIdResolver idResolver)
-
Methods inherited from class one.microstream.persistence.binary.internal.AbstractBinaryHandlerTrivial
allMembers, complete, hasInstanceReferences, hasPersistedReferences, hasVaryingPersistedLengthInstances, instanceMembers, isPrimitiveType, iterateInstanceReferences, iterateLoadableReferences, iterateMemberTypes, membersPersistedLengthMaximum, membersPersistedLengthMinimum
-
Methods inherited from class one.microstream.persistence.binary.types.BinaryTypeHandler.Abstract
declaredField, declaredField
-
Methods inherited from class one.microstream.persistence.types.PersistenceTypeHandler.Abstract
declaredField, declaredFields, initialize, toString, type, typeId, typeName, validateAndImmure
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
hasPersistedVariableLength, 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
collectEnumConstants, getPersistedEnumOrdinal, guaranteeSubTypeInstanceViablity, initialize, isSubTypeInstanceViable, membersInDeclaredOrder, settingMembers, storingMembers, type
-
-
-
-
Method Detail
-
New
public static <T> BinaryHandlerAbstractType<T> New(Class<T> type)
-
New
public static <T> BinaryHandlerAbstractType<T> New(Class<T> type, String typeName)
-
store
public final void store(Binary bytes, T instance, long objectId, PersistenceStoreHandler handler)
-
create
public final T create(Binary bytes, PersistenceObjectIdResolver idResolver)
-
update
public final void update(Binary bytes, T instance, PersistenceObjectIdResolver idResolver)
- Specified by:
update
in interfacePersistenceTypeHandler<Binary,T>
- Overrides:
update
in classAbstractBinaryHandlerTrivial<T>
-
guaranteeSpecificInstanceViablity
public final void guaranteeSpecificInstanceViablity() throws PersistenceExceptionTypeNotPersistable
Description copied from interface:PersistenceTypeHandler
Guarantees that thePersistenceTypeHandler
implementation is actually viably usable to handle instances. That is the natural purpose of type handlers, but there are exceptions, like type handlers created for abstract types or unpersistable types just to have a metadata representation that links a type and a type id.See occurances of
PersistenceExceptionTypeNotPersistable
.- Throws:
PersistenceExceptionTypeNotPersistable
- See Also:
PersistenceExceptionTypeNotPersistable
-
isSpecificInstanceViable
public final boolean isSpecificInstanceViable()
-
-