Package one.microstream.collections
Class BinaryHandlerSingleton
- java.lang.Object
-
- one.microstream.persistence.types.PersistenceTypeHandler.Abstract<Binary,T>
-
- one.microstream.persistence.binary.types.BinaryTypeHandler.Abstract<T>
-
- one.microstream.persistence.binary.internal.AbstractBinaryHandlerCustom<T>
-
- one.microstream.persistence.binary.internal.AbstractBinaryHandlerCustomCollection<Singleton<Object>>
-
- one.microstream.collections.BinaryHandlerSingleton
-
- All Implemented Interfaces:
BinaryTypeHandler<Singleton<Object>>
,PersistenceTypeDefinition
,PersistenceTypeDescription
,PersistenceTypeHandler<Binary,Singleton<Object>>
,PersistenceTypeIdentity
,PersistenceTypeIdOwner
,PersistenceTypeLink
public final class BinaryHandlerSingleton extends AbstractBinaryHandlerCustomCollection<Singleton<Object>>
-
-
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<D,T>
-
-
Constructor Summary
Constructors Constructor Description BinaryHandlerSingleton()
-
Method Summary
Modifier and Type Method Description Singleton<Object>
create(Binary data, PersistenceLoadHandler handler)
static long
getReferenceObjectId(Binary data)
boolean
hasPersistedVariableLength()
Provides information if two instances of the handled type can have different length in persisted form.boolean
hasVaryingPersistedLengthInstances()
Provides information if one particular instance can have variing binary length from one store to another.void
iterateInstanceReferences(Singleton<Object> instance, PersistenceFunction iterator)
void
iterateLoadableReferences(Binary data, PersistenceReferenceLoader iterator)
static BinaryHandlerSingleton
New()
void
store(Binary data, Singleton<Object> instance, long objectId, PersistenceStoreHandler handler)
void
updateState(Binary data, Singleton<Object> instance, PersistenceLoadHandler handler)
-
Methods inherited from class one.microstream.persistence.binary.internal.AbstractBinaryHandlerCustomCollection
hasInstanceReferences, hasPersistedReferences
-
Methods inherited from class one.microstream.persistence.binary.internal.AbstractBinaryHandlerCustom
allMembers, bytes, chars, complete, Complex, CustomField, CustomField, CustomFields, defineValueType, instanceMembers, isPrimitiveType, iterateMemberTypes, keyValuesFields, membersPersistedLengthMaximum, membersPersistedLengthMinimum, SimpleArrayFields, SizedArrayFields
-
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
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, membersInDeclaredOrder, settingMembers, storingMembers, type
-
-
-
-
Method Detail
-
getReferenceObjectId
public static long getReferenceObjectId(Binary data)
-
New
public static BinaryHandlerSingleton New()
-
store
public void store(Binary data, Singleton<Object> instance, long objectId, PersistenceStoreHandler handler)
- Specified by:
store
in interfacePersistenceTypeHandler<Binary,Singleton<Object>>
- Specified by:
store
in classAbstractBinaryHandlerCustom<Singleton<Object>>
-
create
public Singleton<Object> create(Binary data, PersistenceLoadHandler handler)
- Specified by:
create
in interfacePersistenceTypeHandler<Binary,Singleton<Object>>
- Specified by:
create
in classAbstractBinaryHandlerCustom<Singleton<Object>>
-
updateState
public void updateState(Binary data, Singleton<Object> instance, PersistenceLoadHandler handler)
-
iterateLoadableReferences
public void iterateLoadableReferences(Binary data, PersistenceReferenceLoader iterator)
-
iterateInstanceReferences
public void iterateInstanceReferences(Singleton<Object> instance, PersistenceFunction iterator)
- Specified by:
iterateInstanceReferences
in interfacePersistenceTypeHandler<Binary,Singleton<Object>>
- Overrides:
iterateInstanceReferences
in classAbstractBinaryHandlerCustom<Singleton<Object>>
-
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
- Overrides:
hasPersistedVariableLength
in classAbstractBinaryHandlerCustomCollection<Singleton<Object>>
-
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
- Overrides:
hasVaryingPersistedLengthInstances
in classAbstractBinaryHandlerCustomCollection<Singleton<Object>>
-
-