Class BinaryLoader.Default
java.lang.Object
one.microstream.persistence.binary.types.BinaryLoader.Default
- All Implemented Interfaces:
BinaryEntityDataReader
,BinaryLoader
,PersistenceLoader
,PersistenceLoadHandler
,PersistenceObjectIdAcceptor
,PersistenceObjectLookup
,PersistenceReferenceLoader
,PersistenceRetrieving
,ObjectSwizzling
- Enclosing interface:
- BinaryLoader
public static final class BinaryLoader.Default extends Object implements BinaryLoader, BinaryEntityDataReader, PersistenceReferenceLoader
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.persistence.binary.types.BinaryLoader
BinaryLoader.Creator, BinaryLoader.CreatorChannelHashing, BinaryLoader.CreatorSimple, BinaryLoader.Default
-
Method Summary
Modifier and Type Method Description void
acceptObjectId(long objectId)
protected void
addChunks(XGettingCollection<? extends Binary> chunks)
<C extends Consumer<Object>>
Ccollect(C collector, long... objectIds)
Object
get()
Object
getObject(long objectId)
Retrieves the instance associated with the passed objectId.Persister
getPersister()
protected void
handleAllReferences(BinaryLoadItem item)
protected void
loadReferences(BinaryLoadItem entry)
PersistenceRoots
loadRoots()
Object
lookupObject(long objectId)
protected PersistenceTypeHandler<Binary,Object>
lookupTypeHandler(long tid)
void
readBinaryEntities(ByteBuffer entitiesData)
Expects a raw memory address pointing to the location of a entity raw binary data, starting with its header.void
registerCustomRootRefactoring(Object rootInstance, long customRootObjectId)
Deprecated.void
registerDefaultRootRefactoring(Object rootInstance, long defaultRootObjectId)
Deprecated.void
registerSkip(long objectId)
void
requireReferenceEager(long objectId)
void
requireReferenceLazy(long objectId)
void
requireRoot(Object rootInstance, long rootObjectId)
void
validateType(Object object, long objectId)
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.PersistenceLoadHandler
getObjectRetriever
-
Method Details
-
getPersister
- Specified by:
getPersister
in interfacePersistenceLoadHandler
-
readBinaryEntities
Description copied from interface:BinaryEntityDataReader
Expects a raw memory address pointing to the location of a entity raw binary data, starting with its header.- Specified by:
readBinaryEntities
in interfaceBinaryEntityDataReader
- Parameters:
entitiesData
- the buffer to read from
-
lookupTypeHandler
-
handleAllReferences
-
loadReferences
-
lookupObject
- Specified by:
lookupObject
in interfacePersistenceLoadHandler
- Specified by:
lookupObject
in interfacePersistenceObjectLookup
-
requireRoot
- Specified by:
requireRoot
in interfacePersistenceLoadHandler
-
registerCustomRootRefactoring
@Deprecated public final void registerCustomRootRefactoring(Object rootInstance, long customRootObjectId)Deprecated.- Specified by:
registerCustomRootRefactoring
in interfacePersistenceLoadHandler
-
registerDefaultRootRefactoring
@Deprecated public final void registerDefaultRootRefactoring(Object rootInstance, long defaultRootObjectId)Deprecated.- Specified by:
registerDefaultRootRefactoring
in interfacePersistenceLoadHandler
-
validateType
- Specified by:
validateType
in interfacePersistenceLoadHandler
-
acceptObjectId
public final void acceptObjectId(long objectId)- Specified by:
acceptObjectId
in interfacePersistenceObjectIdAcceptor
-
requireReferenceLazy
public final void requireReferenceLazy(long objectId) -
requireReferenceEager
public final void requireReferenceEager(long objectId)- Specified by:
requireReferenceEager
in interfacePersistenceReferenceLoader
-
addChunks
-
get
- Specified by:
get
in interfacePersistenceRetrieving
-
getObject
Description copied from interface:ObjectSwizzling
Retrieves the instance associated with the passed objectId. Retrieving means guaranteeing that the associated instance is returned. If it does not yet exist, it will be created from persisted data, including all non-lazily referenced objects it is connected to.- Specified by:
getObject
in interfaceObjectSwizzling
- Specified by:
getObject
in interfacePersistenceRetrieving
- Parameters:
objectId
- the objectId defining which instance to return.- Returns:
- the instance associated with the passed objectId.
-
collect
- Specified by:
collect
in interfacePersistenceRetrieving
-
loadRoots
- Specified by:
loadRoots
in interfacePersistenceLoader
-
registerSkip
public final void registerSkip(long objectId)- Specified by:
registerSkip
in interfacePersistenceLoader
-