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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
archive(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceEnvironment<ReadBuffer> env)
Archive the specified snapshot.Snapshot
get(String sSnapshot)
Return aSnapshot
which represents the archived snapshot with the given identifier.com.oracle.datagrid.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(String sSnapshot)
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 Detail
-
list
String[] list()
Return the identifiers of the archived snapshots known to this archiver.- Returns:
- a list of the known archived snapshot identifiers
-
get
Snapshot get(String sSnapshot)
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
boolean remove(String sSnapshot)
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
com.oracle.datagrid.persistence.PersistenceTools getPersistenceTools(String sSnapshot)
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
-
-