Class ViewerBinaryTypeHandlerWrapperAbstract<T>
java.lang.Object
one.microstream.storage.restadapter.ViewerBinaryTypeHandlerWrapperAbstract<T>
- All Implemented Interfaces:
PersistenceDataTypeHolder<Binary>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<Binary,Object>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
- Direct Known Subclasses:
ViewerBinaryTypeHandlerBasic
,ViewerBinaryTypeHandlerNativeArray
public abstract class ViewerBinaryTypeHandlerWrapperAbstract<T> extends Object implements PersistenceTypeHandler<Binary,Object>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceDataTypeHolder
PersistenceDataTypeHolder.Default<D>
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<D,T>
-
Constructor Summary
Constructors Constructor Description ViewerBinaryTypeHandlerWrapperAbstract(PersistenceTypeHandler<Binary,T> nativeHandler)
ViewerBinaryTypeHandlerWrapperAbstract(PersistenceTypeHandler<Binary,T> nativeHandler, ViewerBinaryTypeHandlerGeneric genericHandler)
-
Method Summary
Modifier and Type Method Description XGettingEnum<? extends PersistenceTypeDefinitionMember>
allMembers()
void
complete(Binary medium, Object instance, PersistenceLoadHandler handler)
Completes an initially built instance after all loaded instances have been built.Class<Binary>
dataType()
boolean
hasPersistedReferences()
boolean
hasVaryingPersistedLengthInstances()
Provides information if one particular instance can have variing binary length from one store to another.PersistenceTypeHandler<Binary,Object>
initialize(long typeId)
XGettingEnum<? extends PersistenceTypeDefinitionMember>
instanceMembers()
Enum (unique elements with order), usingPersistenceTypeDescriptionMember.identityHashEqualator()
.boolean
isPrimitiveType()
void
iterateInstanceReferences(Object instance, PersistenceFunction iterator)
void
iterateLoadableReferences(Binary medium, PersistenceReferenceLoader iterator)
<C extends Consumer<? super Class<?>>>
CiterateMemberTypes(C logic)
Iterates the types of persistent members (e.g.long
membersPersistedLengthMaximum()
long
membersPersistedLengthMinimum()
void
store(Binary data, Object instance, long objectId, PersistenceStoreHandler<Binary> handler)
Class<Object>
type()
long
typeId()
The biuniquely associated id value identifying a type description.String
typeName()
The name of the type as defined in the type dictionary.void
updateState(Binary medium, Object instance, PersistenceLoadHandler handler)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
hasPersistedVariableLength, runtimeTypeName, toRuntimeTypeIdentifier
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
instancePrimitiveMembers, instanceReferenceMembers, toTypeIdentifier
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeHandler
collectEnumConstants, create, getPersistedEnumOrdinal, guaranteeSpecificInstanceViablity, guaranteeSubTypeInstanceViablity, initializeState, isSpecificInstanceViable, isSubTypeInstanceViable, isValidEntityType, membersInDeclaredOrder, settingMembers, storingMembers, validateEntityType
-
Constructor Details
-
ViewerBinaryTypeHandlerWrapperAbstract
-
ViewerBinaryTypeHandlerWrapperAbstract
public ViewerBinaryTypeHandlerWrapperAbstract(PersistenceTypeHandler<Binary,T> nativeHandler, ViewerBinaryTypeHandlerGeneric genericHandler)
-
-
Method Details
-
typeId
public long typeId()Description copied from interface:PersistenceTypeDefinition
The biuniquely associated id value identifying a type description.- Specified by:
typeId
in interfacePersistenceTypeDefinition
- Specified by:
typeId
in interfacePersistenceTypeIdentity
- Specified by:
typeId
in interfacePersistenceTypeIdOwner
- Specified by:
typeId
in interfacePersistenceTypeLink
-
typeName
Description copied from interface:PersistenceTypeDefinition
The name of the type as defined in the type dictionary. This name may never change for a given typeId, even if the runtimePersistenceTypeDefinition.runtimeTypeName()
did to reflect a design-level type renaming.- Specified by:
typeName
in interfacePersistenceTypeDefinition
- Specified by:
typeName
in interfacePersistenceTypeDescription
- Specified by:
typeName
in interfacePersistenceTypeIdentity
-
hasPersistedReferences
public boolean hasPersistedReferences()- Specified by:
hasPersistedReferences
in interfacePersistenceTypeDefinition
-
membersPersistedLengthMinimum
public long membersPersistedLengthMinimum()- Specified by:
membersPersistedLengthMinimum
in interfacePersistenceTypeDefinition
-
membersPersistedLengthMaximum
public long membersPersistedLengthMaximum()- Specified by:
membersPersistedLengthMaximum
in interfacePersistenceTypeDefinition
-
isPrimitiveType
public boolean isPrimitiveType()- Specified by:
isPrimitiveType
in interfacePersistenceTypeDefinition
-
hasVaryingPersistedLengthInstances
public boolean hasVaryingPersistedLengthInstances()Description copied from interface:PersistenceTypeDefinition
Provides information if one particular instance can have variing binary length from one store to another.Examples for variable length instances:
- variable size collection instances
- variable size pesudo collection instances like
java.util.StringBuilder
- instances of custom defined types similar to collections
Examples for fixed length instances:
- arrays
- all immutable type instances (like
java.lang.String
) - all fixed length types (see
PersistenceTypeDefinition.hasVaryingPersistedLengthInstances()
- Specified by:
hasVaryingPersistedLengthInstances
in interfacePersistenceTypeDefinition
-
type
- Specified by:
type
in interfacePersistenceTypeDefinition
- Specified by:
type
in interfacePersistenceTypeHandler<Binary,Object>
- Specified by:
type
in interfacePersistenceTypeLink
-
allMembers
- Specified by:
allMembers
in interfacePersistenceTypeDefinition
- Specified by:
allMembers
in interfacePersistenceTypeDescription
- Specified by:
allMembers
in interfacePersistenceTypeHandler<Binary,Object>
-
instanceMembers
Description copied from interface:PersistenceTypeDefinition
Enum (unique elements with order), usingPersistenceTypeDescriptionMember.identityHashEqualator()
. Contains all persistent members (similar, but not identical to fields) in persistent order, which can differ from the declaration order.- Specified by:
instanceMembers
in interfacePersistenceTypeDefinition
- Specified by:
instanceMembers
in interfacePersistenceTypeDescription
- Specified by:
instanceMembers
in interfacePersistenceTypeHandler<Binary,Object>
-
iterateMemberTypes
Description copied from interface:PersistenceTypeHandler
Iterates the types of persistent members (e.g. non-transientField
s). 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:
iterateMemberTypes
in interfacePersistenceTypeHandler<Binary,Object>
-
iterateInstanceReferences
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<Binary,Object>
-
store
public void store(Binary data, Object instance, long objectId, PersistenceStoreHandler<Binary> handler)- Specified by:
store
in interfacePersistenceTypeHandler<Binary,Object>
-
updateState
- Specified by:
updateState
in interfacePersistenceTypeHandler<Binary,Object>
-
complete
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<Binary,Object>
-
iterateLoadableReferences
- Specified by:
iterateLoadableReferences
in interfacePersistenceTypeHandler<Binary,Object>
-
initialize
- Specified by:
initialize
in interfacePersistenceTypeHandler<Binary,Object>
-
dataType
- Specified by:
dataType
in interfacePersistenceDataTypeHolder<T>
- Specified by:
dataType
in interfacePersistenceTypeHandler<Binary,Object>
-