Package com.tangosol.persistence
Interface SnapshotArchiver
- All Known Implementing Classes:
AbstractSnapshotArchiver,DirectorySnapshotArchiver
public interface SnapshotArchiver
An interface for archiving and restoring snapshots.
- Since:
- 12.2.1
- Author:
- jh/tam 2014.03.05
-
Method Summary
Modifier and TypeMethodDescriptionvoidarchive(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env) Archive the specified snapshot.Return aSnapshotwhich represents the archived snapshot with the given identifier.com.oracle.coherence.persistence.PersistenceToolsgetPersistenceTools(String sSnapshot) Return an instance ofPersistenceToolsallowing offline operations to be performed against the associated PersistenceManager and appropriatePersistentStore.String[]list()Return the identifiers of the archived snapshots known to this archiver.booleanRemove the archived snapshot with the specified identifier.voidretrieve(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env) Retrieve the specified archived snapshot.
-
Method Details
-
list
String[] list()Return the identifiers of the archived snapshots known to this archiver.- Returns:
- a list of the known archived snapshot identifiers
-
get
Return aSnapshotwhich represents the archived snapshot with the given identifier.- Parameters:
sSnapshot- the identifier of the archived snapshot- Returns:
- the
Snapshot - Throws:
IllegalArgumentException- if an archived snapshot with the given identifier does not exist
-
remove
Remove the archived snapshot with the specified identifier.- Parameters:
sSnapshot- the identifier of the archived snapshot- Returns:
- true if the snapshot was successfully deleted, false otherwise
-
archive
void archive(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env) Archive the specified snapshot.- Parameters:
snapshot- the snapshot to archiveenv- the PersistenceEnvironment used to read the snapshot- Throws:
com.oracle.coherence.persistence.PersistenceException- if an error occurred while reading the snapshotIllegalArgumentException- if a snapshot represented by the givenSnapshotdoes not exist
-
retrieve
void retrieve(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env) Retrieve the specified archived snapshot.- Parameters:
snapshot- the snapshot to retrieveenv- the PersistenceEnvironment used to write the snapshot- Throws:
com.oracle.coherence.persistence.PersistenceException- if an error occurred while writing the snapshotIllegalArgumentException- if an archived snapshot represented by the givenSnapshotdoes not exist
-
getPersistenceTools
Return an instance ofPersistenceToolsallowing offline operations to be performed against the associated PersistenceManager and appropriatePersistentStore.- Parameters:
sSnapshot- the snapshot to return tools for- Returns:
- a PersistenceTools implementation
-