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 TypeMethodDescriptionvoid
archive
(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env) Archive the specified snapshot.Return aSnapshot
which represents the archived snapshot with the given identifier.com.oracle.coherence.persistence.PersistenceTools
getPersistenceTools
(String sSnapshot) Return an instance ofPersistenceTools
allowing offline operations to be performed against the associated PersistenceManager and appropriatePersistentStore
.String[]
list()
Return the identifiers of the archived snapshots known to this archiver.boolean
Remove the archived snapshot with the specified identifier.void
retrieve
(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 aSnapshot
which 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 givenSnapshot
does 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 givenSnapshot
does not exist
-
getPersistenceTools
Return an instance ofPersistenceTools
allowing offline operations to be performed against the associated PersistenceManager and appropriatePersistentStore
.- Parameters:
sSnapshot
- the snapshot to return tools for- Returns:
- a PersistenceTools implementation
-