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
ConstructorsConstructorDescriptionDirectorySnapshotArchiver(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 voidarchiveInternal(Snapshot snapshot, com.oracle.coherence.persistence.PersistenceManager<ReadBuffer> mgr) Internal implementation to Archive the specified snapshot.protected PropertiesgetMetadata(String sSnapshot) Internal implementation to retrieve the metadata stored for the archived snapshot.The shared directory to write archives to.protected booleanInternal implementation to check if the specified archived store is empty.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 booleanremoveInternal(String sSnapshot) Internal implementation to remove the specified archived snapshot.protected voidretrieveInternal(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:AbstractSnapshotArchiverInternal implementation to return the identifiers of the archived snapshots known to this archiver.- Specified by:
listInternalin 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:AbstractSnapshotArchiverInternal implementation to Archive the specified snapshot.- Specified by:
archiveInternalin 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:AbstractSnapshotArchiverInternal implementation to retrieve the specified snapshot.- Specified by:
retrieveInternalin classAbstractSnapshotArchiver- Parameters:
snapshot- the snapshot to retrievemgr- the PersistenceManager used to write the stores to
-
removeInternal
Description copied from class:AbstractSnapshotArchiverInternal implementation to remove the specified archived snapshot. (Called by JMX operation removeArchivedSnapshot)- Specified by:
removeInternalin classAbstractSnapshotArchiver- Parameters:
sSnapshot- the snapshot name to remove- Returns:
- true if the snapshot was removed
-
listStoresInternal
Description copied from class:AbstractSnapshotArchiverList the stores for a given snapshot.- Specified by:
listStoresInternalin classAbstractSnapshotArchiver- Parameters:
sSnapshot- the snapshot name to list stores for- Returns:
- a
String[] of store names
-
getMetadata
Description copied from class:AbstractSnapshotArchiverInternal implementation to retrieve the metadata stored for the archived snapshot.- Specified by:
getMetadatain classAbstractSnapshotArchiver- Parameters:
sSnapshot- the snapshot name to retrieve metadata- Returns:
- the metadata for the archived snapshot
- Throws:
IOException- if any I/O related problems
-
isEmpty
Description copied from class:AbstractSnapshotArchiverInternal implementation to check if the specified archived store is empty.- Specified by:
isEmptyin classAbstractSnapshotArchiver- Parameters:
sSnapshot- the snapshot namesStore- the store name- Returns:
- true if the store is empty
-
toString
Description copied from class:AbstractSnapshotArchiver- Overrides:
toStringin classAbstractSnapshotArchiver
-