Interface IPersistenceService
-
public interface IPersistenceService
Service for basic component persistence features.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFuture<java.lang.Void>
addIdleHook(IIdleHook hook)
Set the idle hook to be called when a component becomes idle.IFuture<java.lang.Void>
restore(IPersistInfo pi)
Restore a component from a snapshot.IFuture<java.lang.Void>
restore(java.util.Collection<IPersistInfo> pis)
Restore components from a snapshot.IFuture<IPersistInfo>
snapshot(IComponentIdentifier cid)
Get the component state.IFuture<java.util.Collection<IPersistInfo>>
snapshot(java.util.Collection<IComponentIdentifier> cids, boolean recursive)
Get the component states.IFuture<java.lang.Void>
swapFromStorage(IPersistInfo pi)
Transparently restore the component state of a previously swapped component.IFuture<IPersistInfo>
swapToStorage(IComponentIdentifier cid)
Fetch the component state and transparently remove it from memory.
-
-
-
Method Detail
-
snapshot
IFuture<IPersistInfo> snapshot(IComponentIdentifier cid)
Get the component state.- Parameters:
cid
- The component to be saved.recursive
- True, if subcomponents should be saved as well.- Returns:
- The component(s) state.
-
snapshot
IFuture<java.util.Collection<IPersistInfo>> snapshot(java.util.Collection<IComponentIdentifier> cids, boolean recursive)
Get the component states.- Parameters:
cids
- The components to be saved.recursive
- True, if subcomponents should be saved as well.- Returns:
- The component state(s).
-
restore
IFuture<java.lang.Void> restore(IPersistInfo pi)
Restore a component from a snapshot.- Parameters:
pi
- The component snapshot.
-
restore
IFuture<java.lang.Void> restore(java.util.Collection<IPersistInfo> pis)
Restore components from a snapshot.- Parameters:
pis
- The component snapshots.
-
swapToStorage
IFuture<IPersistInfo> swapToStorage(IComponentIdentifier cid)
Fetch the component state and transparently remove it from memory. Keeps the component available in CMS to allow restoring it on access.- Parameters:
cid
- The component identifier.- Returns:
- The component state.
-
swapFromStorage
IFuture<java.lang.Void> swapFromStorage(IPersistInfo pi)
Transparently restore the component state of a previously swapped component.- Parameters:
pi
- The persist info.
-
-