Package one.microstream.com
Class ComPersistenceChannel.Abstract<C,D>
java.lang.Object
one.microstream.com.ComPersistenceChannel.Abstract<C,D>
- All Implemented Interfaces:
ComPersistenceChannel<C,D>
,PersistenceChannel<D>
,PersistenceSource<D>
,PersistenceTarget<D>
- 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.com.ComPersistenceChannel
ComPersistenceChannel.Abstract<C,D>
-
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 D>
read()
A general, unspecific read, e.g.XGettingCollection<? extends D>
readByObjectIds(PersistenceIdSet[] objectIds)
void
write(D data)
-
Constructor Details
-
Abstract
public Abstract()
-
-
Method Details
-
read
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
- 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 defined file.- 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 defined file.- 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 D> readByObjectIds(PersistenceIdSet[] objectIds) throws PersistenceExceptionTransfer- Specified by:
readByObjectIds
in interfacePersistenceSource<C>
- Throws:
PersistenceExceptionTransfer
-