Class ComPersistenceChannel.Abstract<C,D>
java.lang.Object
one.microstream.communication.types.ComPersistenceChannel.Abstract<C,D>
- All Implemented Interfaces:
WriteController,ComPersistenceChannel<C,D>,PersistenceChannel<D>,PersistenceSource<D>,PersistenceTarget<D>,PersistenceWriteController
- Direct Known Subclasses:
ComPersistenceChannelBinary.Abstract
- Enclosing interface:
- ComPersistenceChannel<C,D>
public abstract static class ComPersistenceChannel.Abstract<C,D> extends Object implements ComPersistenceChannel<C,D>
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.communication.types.ComPersistenceChannel
ComPersistenceChannel.Abstract<C,D>Nested classes/interfaces inherited from interface one.microstream.persistence.types.PersistenceWriteController
PersistenceWriteController.Disabled, PersistenceWriteController.Enabled, PersistenceWriteController.Wrapper -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidcloseChannel()abstract voidcloseSource()Take actions to deactivate/close/destroy the source because it won't be read again.abstract voidcloseTarget()Take actions to deactivate/close/destroy the target because it won't be written to again.protected CgetConnection()protected abstract XGettingCollection<? extends D>internalRead(C connection)protected abstract voidinternalWrite(C channel, D data)voidprepareChannel()abstract voidprepareSource()Prepare to read from this source.abstract voidprepareTarget()Prepare to write to this target.XGettingCollection<? extends D>read()A general, unspecific read, e.g.XGettingCollection<? extends D>readByObjectIds(PersistenceIdSet[] objectIds)voidwrite(D data)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface one.microstream.persistence.types.PersistenceWriteController
isStoringEnabled, validateIsStoringEnabledMethods inherited from interface one.microstream.afs.types.WriteController
isWritable, validateIsWritable
-
Constructor Details
-
Method Details
-
getConnection
-
internalRead
protected abstract XGettingCollection<? extends D> internalRead(C connection) throws PersistenceExceptionTransfer- Throws:
PersistenceExceptionTransfer
-
internalWrite
- Throws:
PersistenceExceptionTransfer
-
read
Description copied from interface:PersistenceSourceA general, unspecific read, e.g. to initially read data in general from the attached data source.Examples:
- simply ALL data from a plain file.
- only root nodes (and all recursively referenced nodes) of a graph-based database.
- nothing at all if not applicable, resulting in
nullbeing returned.
- Specified by:
readin interfacePersistenceSource<C>- Returns:
- data segments containing general data if applicable, otherwise
null. - Throws:
PersistenceExceptionTransfer
-
write
- Specified by:
writein interfacePersistenceTarget<C>- Throws:
PersistenceExceptionTransfer
-
prepareChannel
public void prepareChannel()- Specified by:
prepareChannelin interfacePersistenceChannel<C>
-
closeChannel
public void closeChannel()- Specified by:
closeChannelin interfacePersistenceChannel<C>
-
prepareSource
public abstract void prepareSource()Description copied from interface:PersistenceSourcePrepare to read from this source. E.g. open a defined file.- Specified by:
prepareSourcein interfacePersistenceSource<C>
-
prepareTarget
public abstract void prepareTarget()Description copied from interface:PersistenceTargetPrepare to write to this target. E.g. open a defined file.- Specified by:
prepareTargetin interfacePersistenceTarget<C>
-
closeSource
public abstract void closeSource()Description copied from interface:PersistenceSourceTake actions to deactivate/close/destroy the source because it won't be read again.- Specified by:
closeSourcein interfacePersistenceSource<C>
-
closeTarget
public abstract void closeTarget()Description copied from interface:PersistenceTargetTake actions to deactivate/close/destroy the target because it won't be written to again.- Specified by:
closeTargetin interfacePersistenceTarget<C>
-
readByObjectIds
public XGettingCollection<? extends D> readByObjectIds(PersistenceIdSet[] objectIds) throws PersistenceExceptionTransfer- Specified by:
readByObjectIdsin interfacePersistenceSource<C>- Throws:
PersistenceExceptionTransfer
-