Class AbstractBinaryHandlerReflective<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.AbstractBinaryHandlerReflective<T>
- All Implemented Interfaces:
BinaryTypeHandler<T>
,PersistenceDataTypeHolder<Binary>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<Binary,T>
,PersistenceTypeHandlerGeneric<Binary,T>
,PersistenceTypeHandlerReflective<Binary,T>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
- Direct Known Subclasses:
BinaryHandlerGenericEnum
,BinaryHandlerGenericType
public abstract class AbstractBinaryHandlerReflective<T> extends BinaryTypeHandler.Abstract<T> implements PersistenceTypeHandlerReflective<Binary,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.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 Modifier Constructor Description protected
AbstractBinaryHandlerReflective(Class<T> type, String typeName, XGettingEnum<Field> persistableFields, XGettingEnum<Field> persisterFields, PersistenceFieldLengthResolver lengthResolver, PersistenceEagerStoringFieldEvaluator eagerEvaluator, boolean switchByteOrder)
-
Method Summary
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, deriveTypeName, initialize, internalInitialize, toString, type, typeId, typeName, validateAndImmure, validateInstance
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface one.microstream.persistence.binary.types.BinaryTypeHandler
dataType
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDefinition
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, guaranteeSpecificInstanceViablity, guaranteeSubTypeInstanceViablity, initialize, initializeState, isSpecificInstanceViable, isSubTypeInstanceViable, isValidEntityType, type, validateEntityType
-
Constructor Details
-
AbstractBinaryHandlerReflective
protected AbstractBinaryHandlerReflective(Class<T> type, String typeName, XGettingEnum<Field> persistableFields, XGettingEnum<Field> persisterFields, PersistenceFieldLengthResolver lengthResolver, PersistenceEagerStoringFieldEvaluator eagerEvaluator, boolean switchByteOrder)
-
-
Method Details
-
MemberEnum
-
MemberEnum
protected static <D extends PersistenceTypeDefinitionMember> EqHashEnum<D> MemberEnum(XGettingCollection<D> initialMembers) -
deriveMembers
protected static EqHashEnum<PersistenceTypeDefinitionMemberFieldReflective> deriveMembers(XGettingEnum<Field> fields, PersistenceFieldLengthResolver lengthResolver) -
filter
protected static final EqConstHashEnum<PersistenceTypeDefinitionMemberFieldReflective> filter(XGettingCollection<? extends PersistenceTypeDefinitionMemberFieldReflective> fields, Predicate<? super PersistenceTypeDefinitionMemberFieldReflective> predicate) -
unbox
protected static final <C extends Consumer<? super Field>> C unbox(XGettingCollection<? extends PersistenceTypeDefinitionMemberFieldReflective> members, C collector) -
equal
- Throws:
IllegalArgumentException
-
createStorers
protected static void createStorers(Class<?> entityType, Iterable<PersistenceTypeDefinitionMemberFieldReflective> storingMembers, BinaryValueStorer[] storers, PersistenceEagerStoringFieldEvaluator eagerEvaluator, boolean switchByteOrder) -
calculcateBinaryContentLength
protected static long calculcateBinaryContentLength(Iterable<PersistenceTypeDefinitionMemberFieldReflective> storingMembers) -
createTypeDescriptionMembers
protected static final XGettingSequence<PersistenceTypeDefinitionMemberFieldReflective> createTypeDescriptionMembers(Field[] persistentOrderFields, PersistenceFieldLengthResolver lengthResolver) -
objectFieldOffsets
protected static final long[] objectFieldOffsets(Class<?> entityClass, XGettingSequence<? extends PersistenceTypeDefinitionMemberFieldReflective> members) -
initializeStoringMemoryOffsets
protected long[] initializeStoringMemoryOffsets() -
initializeSettingMemoryOffsets
protected long[] initializeSettingMemoryOffsets() -
deriveSetters
-
deriveSetter
-
initializeStoringRefMemOffsets
protected long[] initializeStoringRefMemOffsets() -
filterSettingMembers
protected EqConstHashEnum<PersistenceTypeDefinitionMemberFieldReflective> filterSettingMembers(EqConstHashEnum<PersistenceTypeDefinitionMemberFieldReflective> members) -
filterReferenceMembers
protected EqHashEnum<PersistenceTypeDefinitionMemberFieldReflective> filterReferenceMembers(XGettingCollection<PersistenceTypeDefinitionMemberFieldReflective> members, EqHashEnum<PersistenceTypeDefinitionMemberFieldReflective> target) -
filterPrimitiveMembers
protected EqHashEnum<PersistenceTypeDefinitionMemberFieldReflective> filterPrimitiveMembers(XGettingCollection<PersistenceTypeDefinitionMemberFieldReflective> members, EqHashEnum<PersistenceTypeDefinitionMemberFieldReflective> target) -
deriveAllMembers
protected EqConstHashEnum<PersistenceTypeDefinitionMember> deriveAllMembers(XGettingSequence<? extends PersistenceTypeDefinitionMember> declaredOrderInstanceMembers) -
isSwitchedByteOrder
public final boolean isSwitchedByteOrder() -
instanceFields
- Specified by:
instanceFields
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
instancePrimitiveFields
- Specified by:
instancePrimitiveFields
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
instanceReferenceFields
- Specified by:
instanceReferenceFields
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
isPrimitiveType
public final boolean isPrimitiveType()- Specified by:
isPrimitiveType
in interfacePersistenceTypeDefinition
-
allMembers
- Specified by:
allMembers
in interfacePersistenceTypeDefinition
- Specified by:
allMembers
in interfacePersistenceTypeDescription
- Specified by:
allMembers
in interfacePersistenceTypeHandler<Binary,T>
-
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,T>
- Specified by:
instanceMembers
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
storingMembers
- Specified by:
storingMembers
in interfacePersistenceTypeHandler<Binary,T>
- Specified by:
storingMembers
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
settingMembers
- Specified by:
settingMembers
in interfacePersistenceTypeHandler<Binary,T>
- Specified by:
settingMembers
in interfacePersistenceTypeHandlerReflective<Binary,T>
-
membersInDeclaredOrder
- Specified by:
membersInDeclaredOrder
in interfacePersistenceTypeHandler<Binary,T>
-
hasPersistedReferences
public final boolean hasPersistedReferences()- Specified by:
hasPersistedReferences
in interfacePersistenceTypeDefinition
-
membersPersistedLengthMinimum
public final long membersPersistedLengthMinimum()- Specified by:
membersPersistedLengthMinimum
in interfacePersistenceTypeDefinition
-
membersPersistedLengthMaximum
public final long membersPersistedLengthMaximum()- Specified by:
membersPersistedLengthMaximum
in interfacePersistenceTypeDefinition
-
hasPersistedVariableLength
public final boolean hasPersistedVariableLength()Description copied from interface:PersistenceTypeDefinition
Provides information if two instances of the handled type can have different length in persisted form.Examples for variable length types:
- arrays
java.lang.String
java.util.ArrayList
java.math.BigDecimal
Examples for fixed length types:
- primitive value wrapper types
java.lang.Object
java.util.Date
- typical entity types (without unshared inlined variable length component instances)
- Specified by:
hasPersistedVariableLength
in interfacePersistenceTypeDefinition
-
hasVaryingPersistedLengthInstances
public final 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
-
store
- Specified by:
store
in interfacePersistenceTypeHandler<Binary,T>
-
create
- Specified by:
create
in interfacePersistenceTypeHandler<Binary,T>
-
updateState
- Specified by:
updateState
in interfacePersistenceTypeHandler<Binary,T>
-
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,T>
-
iterateInstanceReferences
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<Binary,T>
-
iterateLoadableReferences
- Specified by:
iterateLoadableReferences
in interfacePersistenceTypeHandler<Binary,T>
-
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,T>
-