Interface IPersistenceService


  • public interface IPersistenceService
    Service for basic component persistence features.
    • 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.
      • addIdleHook

        IFuture<java.lang.Void> addIdleHook​(IIdleHook hook)
        Set the idle hook to be called when a component becomes idle.