R
- the raw value typepublic static class NullImplementation.NullPersistenceManager<R> extends Object implements com.oracle.datagrid.persistence.PersistenceManager<R>, com.oracle.datagrid.persistence.PersistenceTools
PersistenceManager
that does nothing.Modifier and Type | Field and Description |
---|---|
static NullImplementation.NullPersistenceManager |
INSTANCE
Singleton instance of a NullPersistenceManager.
|
Constructor and Description |
---|
NullPersistenceManager() |
Modifier and Type | Method and Description |
---|---|
void |
close(String sId)
Close the associated PersistentStore and release exclusive access to the associated resources.
|
boolean |
delete(String sId, boolean fSafe)
Remove the PersistentStore associated with the specified identifier.
|
String |
getName()
Return the name of this manager.
|
com.oracle.datagrid.persistence.OfflinePersistenceInfo |
getPersistenceInfo()
Return summary information regarding the available
PersistentStore s under the context of the PersistenceManager (snapshot or archived snapshot). |
com.oracle.datagrid.persistence.PersistenceTools |
getPersistenceTools()
Return an instance of
PersistenceTools allowing offline operations to be performed against the associated PersistenceManager and appropriate PersistentStore . |
com.oracle.datagrid.persistence.PersistenceStatistics |
getStatistics()
Return a
PersistenceStatistics object representing the available PersistentStore s under the context of the associated PersistenceManager (snapshot or archived snapshot). |
String[] |
list()
Return the identifiers of the PersistentStores known to this manager.
|
String[] |
listOpen()
Return the identifiers of PersistentStores that are currently open.
|
com.oracle.datagrid.persistence.PersistentStore<R> |
open(String sId, com.oracle.datagrid.persistence.PersistentStore<R> store)
Open or create a
PersistentStore associated with the specified identifier and based on the provided store . |
void |
read(String sId, InputStream in)
Read the PersistenceStore associated with the specified identifier from the given input stream, making it available to this manager.
|
void |
release()
Release all resources held by this manager.
|
void |
validate()
Validate the available
PersistentStore s under the context of the associated PersistenceManager (snapshot or archived snapshot). |
void |
write(String sId, OutputStream out)
Write the PersistentStore associated with the specified identifier to the given output stream.
|
public static final NullImplementation.NullPersistenceManager INSTANCE
public String getName()
getName
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
public com.oracle.datagrid.persistence.PersistentStore<R> open(String sId, com.oracle.datagrid.persistence.PersistentStore<R> store)
PersistentStore
associated with the specified identifier and based on the provided store
.
Upon a new store being created the provided store should be used as the basis for the new store such that the extents and associated data is available in the returned store. This provides an opportunity for an implementation to optimize initializing the new store based upon knowledge of the storage mechanics.
open
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
sId
- a unique identifier for the storestore
- the PersistenceStore the new store should be based uponpublic void close(String sId)
close
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
sId
- a unique identifier of the store to closepublic boolean delete(String sId, boolean fSafe)
delete
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
sId
- a unique identifier of the store to removefSafe
- if true, remove the store by moving it to a restorable location (if possible) rather than deleting itpublic String[] list()
list
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
public String[] listOpen()
listOpen
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
public void read(String sId, InputStream in) throws IOException
read
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
sId
- a unique identifier of the store to readin
- the stream to read fromIOException
- if an error occurred while reading from the streampublic void write(String sId, OutputStream out) throws IOException
write
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
sId
- a unique identifier of the store to writeout
- the stream to write toIOException
- if an error occurred while writing to the streampublic void release()
release
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
public com.oracle.datagrid.persistence.PersistenceTools getPersistenceTools()
PersistenceTools
allowing offline operations to be performed against the associated PersistenceManager and appropriate PersistentStore
.getPersistenceTools
in interface com.oracle.datagrid.persistence.PersistenceManager<R>
public com.oracle.datagrid.persistence.OfflinePersistenceInfo getPersistenceInfo()
com.oracle.datagrid.persistence.PersistenceTools
PersistentStore
s under the context of the PersistenceManager
(snapshot or archived snapshot).getPersistenceInfo
in interface com.oracle.datagrid.persistence.PersistenceTools
public void validate()
com.oracle.datagrid.persistence.PersistenceTools
PersistentStore
s under the context of the associated PersistenceManager
(snapshot or archived snapshot).validate
in interface com.oracle.datagrid.persistence.PersistenceTools
public com.oracle.datagrid.persistence.PersistenceStatistics getStatistics()
com.oracle.datagrid.persistence.PersistenceTools
PersistenceStatistics
object representing the available PersistentStore
s under the context of the associated PersistenceManager
(snapshot or archived snapshot).getStatistics
in interface com.oracle.datagrid.persistence.PersistenceTools