Package com.tangosol.util
Class NullImplementation.NullPersistenceEnvironment<R>
- java.lang.Object
-
- com.tangosol.util.NullImplementation.NullPersistenceEnvironment<R>
-
- Type Parameters:
R- the raw value type
- All Implemented Interfaces:
com.oracle.coherence.persistence.PersistenceEnvironment<R>
- Direct Known Subclasses:
SafePersistenceWrappers.SafePersistenceEnvironment
- Enclosing class:
- NullImplementation
public static class NullImplementation.NullPersistenceEnvironment<R> extends Object implements com.oracle.coherence.persistence.PersistenceEnvironment<R>
APersistenceEnvironmentthat does nothing.
-
-
Field Summary
Fields Modifier and Type Field Description static NullImplementation.NullPersistenceEnvironmentINSTANCESingleton instance of a NullPersistenceEnvironment.
-
Constructor Summary
Constructors Constructor Description NullPersistenceEnvironment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.oracle.coherence.persistence.PersistenceManager<R>createSnapshot(String sSnapshot, com.oracle.coherence.persistence.PersistenceManager<R> manager)Create a PersistenceManager used to manage the snapshot with the specified identifier.String[]listSnapshots()Return the identifiers of the snapshots known to this environment.com.oracle.coherence.persistence.PersistenceManager<R>openActive()Open and return the singleton active PersistenceManager.com.oracle.coherence.persistence.PersistenceManager<R>openSnapshot(String sSnapshot)Open a PersistenceManager used to access the snapshot with the specified identifier.voidrelease()Release all resources held by this environment.booleanremoveSnapshot(String sSnapshot)Remove the persistent artifacts associated with the snapshot with the specified identifier.
-
-
-
Field Detail
-
INSTANCE
public static final NullImplementation.NullPersistenceEnvironment INSTANCE
Singleton instance of a NullPersistenceEnvironment.
-
-
Method Detail
-
openActive
public com.oracle.coherence.persistence.PersistenceManager<R> openActive()
Open and return the singleton active PersistenceManager.- Specified by:
openActivein interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>- Returns:
- the singleton active PersistenceManager or null if an active PersistenceManager has not been configured
-
openSnapshot
public com.oracle.coherence.persistence.PersistenceManager<R> openSnapshot(String sSnapshot)
Open a PersistenceManager used to access the snapshot with the specified identifier.- Specified by:
openSnapshotin interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>- Parameters:
sSnapshot- the snapshot identifier- Returns:
- a PersistenceManager representing the snapshot
-
createSnapshot
public com.oracle.coherence.persistence.PersistenceManager<R> createSnapshot(String sSnapshot, com.oracle.coherence.persistence.PersistenceManager<R> manager)
Create a PersistenceManager used to manage the snapshot with the specified identifier.- Specified by:
createSnapshotin interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>- Parameters:
sSnapshot- the snapshot identifiermanager- the optional PersistenceManager to create a snapshot of; if null, an empty snapshot will be created- Returns:
- a PersistenceManager representing the snapshot
-
removeSnapshot
public boolean removeSnapshot(String sSnapshot)
Remove the persistent artifacts associated with the snapshot with the specified identifier.- Specified by:
removeSnapshotin interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>- Parameters:
sSnapshot- the snapshot identifier- Returns:
- true if the snapshot was successfully deleted, false otherwise
-
listSnapshots
public String[] listSnapshots()
Return the identifiers of the snapshots known to this environment.- Specified by:
listSnapshotsin interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>- Returns:
- a list of the known snapshot identifiers
-
release
public void release()
Release all resources held by this environment. Note that the behavior of all other methods on this environment is undefined after this method is called.- Specified by:
releasein interfacecom.oracle.coherence.persistence.PersistenceEnvironment<R>
-
-