Package com.tangosol.persistence
Class DirectorySnapshotArchiver
java.lang.Object
com.tangosol.persistence.AbstractSnapshotArchiver
com.tangosol.persistence.DirectorySnapshotArchiver
- All Implemented Interfaces:
SnapshotArchiver
An implementation of a
SnapshotArchiver
that uses a shared directory
to store archived snapshots.- Since:
- 12.2.1
- Author:
- tam 2014.08.19
-
Field Summary
Fields inherited from class com.tangosol.persistence.AbstractSnapshotArchiver
f_sClusterName, f_sServiceName, m_cMillisLastStart, m_cMillisMax, m_cMillisMin, m_cMillisTotal
-
Constructor Summary
ConstructorDescriptionDirectorySnapshotArchiver
(String sClusterName, String sServiceName, File fileDirectory) Constructs a new DirectorySnapshotArchiver which uses a shared directory available from all members to store archived snapshots. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
archiveInternal
(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceManager<ReadBuffer> mgr) Internal implementation to Archive the specified snapshot.protected Properties
getMetadata
(String sSnapshot) Internal implementation to retrieve the metadata stored for the archived snapshot.The shared directory to write archives to.protected String[]
Internal implementation to return the identifiers of the archived snapshots known to this archiver.protected String[]
listStoresInternal
(String sSnapshot) List the stores for a given snapshot.protected boolean
removeInternal
(String sSnapshot) Internal implementation to remove the specified archived snapshot.protected void
retrieveInternal
(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceManager<ReadBuffer> mgr) Internal implementation to retrieve the specified snapshot.toString()
Methods inherited from class com.tangosol.persistence.AbstractSnapshotArchiver
archive, createTempEnvironment, displayStatistics, get, getPersistenceTools, hasArchivedSnapshot, hasLocalSnapshot, instantiatePersistenceTools, list, recordEndTime, recordStartTime, remove, resetStatistics, retrieve, writeMetadata
-
Constructor Details
-
DirectorySnapshotArchiver
public DirectorySnapshotArchiver(String sClusterName, String sServiceName, File fileDirectory) throws IOException Constructs a new DirectorySnapshotArchiver which uses a shared directory available from all members to store archived snapshots.- Parameters:
sClusterName
- the name of the clustersServiceName
- the service namefileDirectory
- a shared directory available from all members- Throws:
IOException
- if errors creating directories
-
-
Method Details
-
listInternal
Description copied from class:AbstractSnapshotArchiver
Internal implementation to return the identifiers of the archived snapshots known to this archiver.- Specified by:
listInternal
in classAbstractSnapshotArchiver
- Returns:
- a list of the known archived snapshot identifiers
-
archiveInternal
protected void archiveInternal(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceManager<ReadBuffer> mgr) Description copied from class:AbstractSnapshotArchiver
Internal implementation to Archive the specified snapshot.- Specified by:
archiveInternal
in classAbstractSnapshotArchiver
- Parameters:
snapshot
- the snapshot to archivemgr
- the PersistenceManager used to read the stores from
-
retrieveInternal
protected void retrieveInternal(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceManager<ReadBuffer> mgr) Description copied from class:AbstractSnapshotArchiver
Internal implementation to retrieve the specified snapshot.- Specified by:
retrieveInternal
in classAbstractSnapshotArchiver
- Parameters:
snapshot
- the snapshot to retrievemgr
- the PersistenceManager used to write the stores to
-
removeInternal
Description copied from class:AbstractSnapshotArchiver
Internal implementation to remove the specified archived snapshot. (Called by JMX operation removeArchivedSnapshot)- Specified by:
removeInternal
in classAbstractSnapshotArchiver
- Parameters:
sSnapshot
- the snapshot name to remove- Returns:
- true if the snapshot was removed
-
listStoresInternal
Description copied from class:AbstractSnapshotArchiver
List the stores for a given snapshot.- Specified by:
listStoresInternal
in classAbstractSnapshotArchiver
- Parameters:
sSnapshot
- the snapshot name to list stores for- Returns:
- a
String
[] of store names
-
getMetadata
Description copied from class:AbstractSnapshotArchiver
Internal implementation to retrieve the metadata stored for the archived snapshot.- Specified by:
getMetadata
in classAbstractSnapshotArchiver
- Parameters:
sSnapshot
- the snapshot name to retrieve metadata- Returns:
- the metadata for the archived snapshot
- Throws:
IOException
- if any I/O related problems
-
toString
Description copied from class:AbstractSnapshotArchiver
- Overrides:
toString
in classAbstractSnapshotArchiver
-