Interface PersistenceSource<D>
- All Known Subinterfaces:
ComPersistenceChannel<C,D>
,ComPersistenceChannelBinary<C>
,EmbeddedStorageBinarySource
,PersistenceChannel<D>
- All Known Implementing Classes:
BinaryFileSource
,BinaryFileStorage
,ComPersistenceChannel.Abstract
,ComPersistenceChannelBinary.Abstract
,ComPersistenceChannelBinary.Default
,EmbeddedStorageBinarySource.Default
public interface PersistenceSource<D>
-
Method Summary
Modifier and Type Method Description default void
closeSource()
Take actions to deactivate/close/destroy the source because it won't be read again.default void
prepareSource()
Prepare to read from this source.XGettingCollection<? extends D>
read()
A general, unspecific read, e.g.XGettingCollection<? extends D>
readByObjectIds(PersistenceIdSet[] oids)
-
Method Details
-
read
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.
- Returns:
- data segments containing general data if applicable, otherwise
null
. - Throws:
PersistenceExceptionTransfer
-
readByObjectIds
XGettingCollection<? extends D> readByObjectIds(PersistenceIdSet[] oids) throws PersistenceExceptionTransfer- Throws:
PersistenceExceptionTransfer
-
prepareSource
default void prepareSource()Prepare to read from this source. E.g. open a defined file. -
closeSource
default void closeSource()Take actions to deactivate/close/destroy the source because it won't be read again.
-