R
- the type of a raw, environment specific object representationT
- the type of a Throwable failure to protectpublic static class SafePersistenceWrappers.SafePersistenceEnvironment<R,T extends Throwable> extends NullImplementation.NullPersistenceEnvironment<R>
Continuation
.Modifier and Type | Field and Description |
---|---|
protected com.oracle.coherence.common.base.Continuation<? super T> |
f_contFailure
The failure continuation for this environment.
|
protected com.oracle.coherence.persistence.PersistenceEnvironment<R> |
f_env
The underlying PersistenceEnvironment.
|
protected SafePersistenceWrappers.FailureContinuationFactory<R,? super T> |
f_factoryCont
The FailureContinuationFactory.
|
INSTANCE
Constructor and Description |
---|
SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env)
Construct a PersistenceEnvironment backed by the specified environment.
|
SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env,
com.oracle.coherence.common.base.Continuation<? super Throwable> cont)
Construct a PersistenceEnvironment backed by the specified environment.
|
SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env,
SafePersistenceWrappers.FailureContinuationFactory<R,? super T> factory)
Construct a PersistenceEnvironment backed by the specified environment.
|
Modifier and Type | Method and 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.
|
com.oracle.coherence.persistence.PersistenceEnvironment<R> |
getEnvironment()
Return the underlying PersistenceEnvironment.
|
String[] |
listSnapshots()
Return the identifiers of the snapshots known to this environment.
|
protected void |
onException(T t)
Called to handle an unexpected exception.
|
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.
|
void |
release()
Release all resources held by this environment.
|
boolean |
removeSnapshot(String sSnapshot)
Remove the persistent artifacts associated with the snapshot with the
specified identifier.
|
String |
toString()
Return a human readable description of this SafePersistenceEnvironment.
|
protected com.oracle.coherence.persistence.PersistenceManager |
wrap(com.oracle.coherence.persistence.PersistenceManager<R> mgr)
Wrap the specified manager in a SafePersistenceManager implementation.
|
protected final com.oracle.coherence.persistence.PersistenceEnvironment<R> f_env
protected final com.oracle.coherence.common.base.Continuation<? super T extends Throwable> f_contFailure
protected final SafePersistenceWrappers.FailureContinuationFactory<R,? super T extends Throwable> f_factoryCont
public SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env)
env
- the underlying PersistenceEnvironmentpublic SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env, com.oracle.coherence.common.base.Continuation<? super Throwable> cont)
env
- the underlying PersistenceEnvironmentcont
- the failure continuation to use to handle unexpected exceptionspublic SafePersistenceEnvironment(com.oracle.coherence.persistence.PersistenceEnvironment<R> env, SafePersistenceWrappers.FailureContinuationFactory<R,? super T> factory)
env
- the underlying PersistenceEnvironmentfactory
- the failure continuation factory to use to create handlers
for unexpected exceptionspublic com.oracle.coherence.persistence.PersistenceEnvironment<R> getEnvironment()
protected void onException(T t)
t
- the Throwableprotected com.oracle.coherence.persistence.PersistenceManager wrap(com.oracle.coherence.persistence.PersistenceManager<R> mgr)
mgr
- the underlying PersistenceMangerpublic com.oracle.coherence.persistence.PersistenceManager<R> openActive()
openActive
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
openActive
in class NullImplementation.NullPersistenceEnvironment<R>
public com.oracle.coherence.persistence.PersistenceManager<R> openSnapshot(String sSnapshot)
openSnapshot
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
openSnapshot
in class NullImplementation.NullPersistenceEnvironment<R>
sSnapshot
- the snapshot identifierpublic com.oracle.coherence.persistence.PersistenceManager<R> createSnapshot(String sSnapshot, com.oracle.coherence.persistence.PersistenceManager<R> manager)
createSnapshot
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
createSnapshot
in class NullImplementation.NullPersistenceEnvironment<R>
sSnapshot
- the snapshot identifiermanager
- the optional PersistenceManager to create a snapshot
of; if null, an empty snapshot will be createdpublic boolean removeSnapshot(String sSnapshot)
removeSnapshot
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
removeSnapshot
in class NullImplementation.NullPersistenceEnvironment<R>
sSnapshot
- the snapshot identifierpublic String[] listSnapshots()
listSnapshots
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
listSnapshots
in class NullImplementation.NullPersistenceEnvironment<R>
public void release()
release
in interface com.oracle.coherence.persistence.PersistenceEnvironment<R>
release
in class NullImplementation.NullPersistenceEnvironment<R>