Package one.microstream.com
Class ComPersistenceChannel.Abstract<C,M>
- java.lang.Object
-
- one.microstream.com.ComPersistenceChannel.Abstract<C,M>
-
- All Implemented Interfaces:
ComPersistenceChannel<C,M>
,PersistenceChannel<M>
,PersistenceSource<M>
,PersistenceTarget<M>
- Direct Known Subclasses:
ComPersistenceChannelBinary.Abstract
- Enclosing interface:
- ComPersistenceChannel<C,M>
public abstract static class ComPersistenceChannel.Abstract<C,M> extends Object implements ComPersistenceChannel<C,M>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.com.ComPersistenceChannel
ComPersistenceChannel.Abstract<C,M>
-
-
Constructor Summary
Constructors Constructor Description Abstract()
-
Method Summary
Modifier and Type Method Description void
closeChannel()
abstract void
closeSource()
Take actions to deactivate/close/destroy the source because it won't be read again.abstract void
closeTarget()
Take actions to deactivate/close/destroy the target because it won't be written to again.void
prepareChannel()
abstract void
prepareSource()
Prepare to read from this source.abstract void
prepareTarget()
Prepare to write to this target.XGettingCollection<? extends M>
read()
A general, unspecific read, e.g.XGettingCollection<? extends M>
readByObjectIds(PersistenceIdSet[] objectIds)
void
write(M data)
-
-
-
Method Detail
-
read
public XGettingCollection<? extends M> read() throws PersistenceExceptionTransfer
Description copied from interface:PersistenceSource
A 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
null
being returned.
- Specified by:
read
in interfacePersistenceSource<C>
- Returns:
- data segments containing general data if applicable, otherwise
null
. - Throws:
PersistenceExceptionTransfer
-
write
public void write(M data) throws PersistenceExceptionTransfer
- Specified by:
write
in interfacePersistenceTarget<C>
- Throws:
PersistenceExceptionTransfer
-
prepareChannel
public void prepareChannel()
- Specified by:
prepareChannel
in interfacePersistenceChannel<C>
-
closeChannel
public void closeChannel()
- Specified by:
closeChannel
in interfacePersistenceChannel<C>
-
prepareSource
public abstract void prepareSource()
Description copied from interface:PersistenceSource
Prepare to read from this source. E.g. open a definedFile
.- Specified by:
prepareSource
in interfacePersistenceSource<C>
-
prepareTarget
public abstract void prepareTarget()
Description copied from interface:PersistenceTarget
Prepare to write to this target. E.g. open a definedFile
.- Specified by:
prepareTarget
in interfacePersistenceTarget<C>
-
closeSource
public abstract void closeSource()
Description copied from interface:PersistenceSource
Take actions to deactivate/close/destroy the source because it won't be read again.- Specified by:
closeSource
in interfacePersistenceSource<C>
-
closeTarget
public abstract void closeTarget()
Description copied from interface:PersistenceTarget
Take actions to deactivate/close/destroy the target because it won't be written to again.- Specified by:
closeTarget
in interfacePersistenceTarget<C>
-
readByObjectIds
public XGettingCollection<? extends M> readByObjectIds(PersistenceIdSet[] objectIds) throws PersistenceExceptionTransfer
- Specified by:
readByObjectIds
in interfacePersistenceSource<C>
- Throws:
PersistenceExceptionTransfer
-
-