Package one.microstream.storage.types
Class StorageEntityTypeHandler.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageEntityTypeHandler.Default
-
- All Implemented Interfaces:
PersistenceTypeDefinition,PersistenceTypeDescription,PersistenceTypeIdentity,PersistenceTypeIdOwner,PersistenceTypeLink,StorageEntityTypeHandler
- Enclosing interface:
- StorageEntityTypeHandler
public static final class StorageEntityTypeHandler.Default extends Object implements StorageEntityTypeHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
PersistenceTypeDescription.Identity
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageEntityTypeHandler
StorageEntityTypeHandler.Default
-
-
Constructor Summary
Constructors Constructor Description Default(PersistenceTypeDefinition typeDefinition, boolean switchByteOrder)
-
Method Summary
Modifier and Type Method Description XGettingEnum<? extends PersistenceTypeDefinitionMember>allMembers()booleanhasPersistedReferences()booleanhasPersistedVariableLength()Provides information if two instances of the handled type can have different length in persisted form.booleanhasVaryingPersistedLengthInstances()Provides information if one particular instance can have variing binary length from one store to another.XGettingEnum<? extends PersistenceTypeDefinitionMember>instanceMembers()Enum (unique elements with order), usingPersistenceTypeDescriptionMember.identityHashEqualator().booleanisPrimitiveType()booleanisValidEntityGuaranteedType(long length, long objectId)voiditerateReferences(long entityCacheAddress, PersistenceObjectIdAcceptor acceptor)longmaximumLength()longmembersPersistedLengthMaximum()longmembersPersistedLengthMinimum()longminimumLength()longsimpleReferenceCount()StringtoString()Class<?>type()longtypeId()The biuniquely associated id value identifying a type description.StringtypeName()The name of the type as defined in the type dictionary.voidvalidateEntity(long length, long typeId, long objectId)voidvalidateEntityGuaranteedType(long length, long objectId)-
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
runtimeTypeName, toRuntimeTypeIdentifier
-
Methods inherited from interface one.microstream.persistence.types.PersistenceTypeDescription
toTypeIdentifier
-
-
-
-
Constructor Detail
-
Default
public Default(PersistenceTypeDefinition typeDefinition, boolean switchByteOrder)
-
-
Method Detail
-
typeId
public final long typeId()
Description copied from interface:PersistenceTypeDefinitionThe biuniquely associated id value identifying a type description.- Specified by:
typeIdin interfacePersistenceTypeDefinition- Specified by:
typeIdin interfacePersistenceTypeIdentity- Specified by:
typeIdin interfacePersistenceTypeIdOwner- Specified by:
typeIdin interfacePersistenceTypeLink
-
typeName
public final String typeName()
Description copied from interface:PersistenceTypeDefinitionThe 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:
typeNamein interfacePersistenceTypeDefinition- Specified by:
typeNamein interfacePersistenceTypeDescription- Specified by:
typeNamein interfacePersistenceTypeIdentity
-
type
public final Class<?> type()
- Specified by:
typein interfacePersistenceTypeDefinition- Specified by:
typein interfacePersistenceTypeLink
-
allMembers
public final XGettingEnum<? extends PersistenceTypeDefinitionMember> allMembers()
- Specified by:
allMembersin interfacePersistenceTypeDefinition- Specified by:
allMembersin interfacePersistenceTypeDescription
-
instanceMembers
public final XGettingEnum<? extends PersistenceTypeDefinitionMember> instanceMembers()
Description copied from interface:PersistenceTypeDefinitionEnum (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:
instanceMembersin interfacePersistenceTypeDefinition- Specified by:
instanceMembersin interfacePersistenceTypeDescription
-
membersPersistedLengthMinimum
public final long membersPersistedLengthMinimum()
- Specified by:
membersPersistedLengthMinimumin interfacePersistenceTypeDefinition
-
membersPersistedLengthMaximum
public final long membersPersistedLengthMaximum()
- Specified by:
membersPersistedLengthMaximumin interfacePersistenceTypeDefinition
-
iterateReferences
public final void iterateReferences(long entityCacheAddress, PersistenceObjectIdAcceptor acceptor)- Specified by:
iterateReferencesin interfaceStorageEntityTypeHandler
-
validateEntity
public final void validateEntity(long length, long typeId, long objectId)- Specified by:
validateEntityin interfaceStorageEntityTypeHandler
-
isValidEntityGuaranteedType
public boolean isValidEntityGuaranteedType(long length, long objectId)- Specified by:
isValidEntityGuaranteedTypein interfaceStorageEntityTypeHandler
-
validateEntityGuaranteedType
public final void validateEntityGuaranteedType(long length, long objectId)- Specified by:
validateEntityGuaranteedTypein interfaceStorageEntityTypeHandler
-
hasPersistedReferences
public final boolean hasPersistedReferences()
- Specified by:
hasPersistedReferencesin interfacePersistenceTypeDefinition
-
isPrimitiveType
public final boolean isPrimitiveType()
- Specified by:
isPrimitiveTypein interfacePersistenceTypeDefinition
-
hasPersistedVariableLength
public final boolean hasPersistedVariableLength()
Description copied from interface:PersistenceTypeDefinitionProvides 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:
hasPersistedVariableLengthin interfacePersistenceTypeDefinition- Specified by:
hasPersistedVariableLengthin interfaceStorageEntityTypeHandler
-
hasVaryingPersistedLengthInstances
public final boolean hasVaryingPersistedLengthInstances()
Description copied from interface:PersistenceTypeDefinitionProvides 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:
hasVaryingPersistedLengthInstancesin interfacePersistenceTypeDefinition
-
simpleReferenceCount
public final long simpleReferenceCount()
- Specified by:
simpleReferenceCountin interfaceStorageEntityTypeHandler
-
minimumLength
public final long minimumLength()
- Specified by:
minimumLengthin interfaceStorageEntityTypeHandler
-
maximumLength
public final long maximumLength()
- Specified by:
maximumLengthin interfaceStorageEntityTypeHandler
-
-