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 Continuation<? super T> |
f_contFailure
The failure continuation for this environment.
|
protected com.oracle.datagrid.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.datagrid.persistence.PersistenceEnvironment<R> env)
Construct a PersistenceEnvironment backed by the specified environment.
|
SafePersistenceEnvironment(com.oracle.datagrid.persistence.PersistenceEnvironment<R> env, Continuation<? super Throwable> cont)
Construct a PersistenceEnvironment backed by the specified environment.
|
SafePersistenceEnvironment(com.oracle.datagrid.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.datagrid.persistence.PersistenceManager<R> |
createSnapshot(String sSnapshot, com.oracle.datagrid.persistence.PersistenceManager<R> manager)
Create a PersistenceManager used to manage the snapshot with the specified identifier.
|
com.oracle.datagrid.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.datagrid.persistence.PersistenceManager<R> |
openActive()
Open and return the singleton active PersistenceManager.
|
com.oracle.datagrid.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.datagrid.persistence.PersistenceManager |
wrap(com.oracle.datagrid.persistence.PersistenceManager<R> mgr)
Wrap the specified manager in a SafePersistenceManager implementation.
|
protected final com.oracle.datagrid.persistence.PersistenceEnvironment<R> f_env
protected final Continuation<? super T extends Throwable> f_contFailure
protected final SafePersistenceWrappers.FailureContinuationFactory<R,? super T extends Throwable> f_factoryCont
public SafePersistenceEnvironment(com.oracle.datagrid.persistence.PersistenceEnvironment<R> env)
env - the underlying PersistenceEnvironmentpublic SafePersistenceEnvironment(com.oracle.datagrid.persistence.PersistenceEnvironment<R> env, Continuation<? super Throwable> cont)
env - the underlying PersistenceEnvironmentcont - the failure continuation to use to handle unexpected exceptionspublic SafePersistenceEnvironment(com.oracle.datagrid.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.datagrid.persistence.PersistenceEnvironment<R> getEnvironment()
protected void onException(T t)
t - the Throwableprotected com.oracle.datagrid.persistence.PersistenceManager wrap(com.oracle.datagrid.persistence.PersistenceManager<R> mgr)
mgr - the underlying PersistenceMangerpublic com.oracle.datagrid.persistence.PersistenceManager<R> openActive()
openActive in interface com.oracle.datagrid.persistence.PersistenceEnvironment<R>openActive in class NullImplementation.NullPersistenceEnvironment<R>public com.oracle.datagrid.persistence.PersistenceManager<R> openSnapshot(String sSnapshot)
openSnapshot in interface com.oracle.datagrid.persistence.PersistenceEnvironment<R>openSnapshot in class NullImplementation.NullPersistenceEnvironment<R>sSnapshot - the snapshot identifierpublic com.oracle.datagrid.persistence.PersistenceManager<R> createSnapshot(String sSnapshot, com.oracle.datagrid.persistence.PersistenceManager<R> manager)
createSnapshot in interface com.oracle.datagrid.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.datagrid.persistence.PersistenceEnvironment<R>removeSnapshot in class NullImplementation.NullPersistenceEnvironment<R>sSnapshot - the snapshot identifierpublic String[] listSnapshots()
listSnapshots in interface com.oracle.datagrid.persistence.PersistenceEnvironment<R>listSnapshots in class NullImplementation.NullPersistenceEnvironment<R>public void release()
release in interface com.oracle.datagrid.persistence.PersistenceEnvironment<R>release in class NullImplementation.NullPersistenceEnvironment<R>