PersistenceManager API for persistence and overflow.
More...
Inherits apache::geode::client::SharedBase.
PersistenceManager API for persistence and overflow.
This class abstracts the disk-related operations in case of persistence or overflow to disk. A specific disk storage implementation will implement all the methods described here.
virtual apache::geode::client::PersistenceManager::~PersistenceManager |
( |
| ) |
|
|
pure virtual |
virtual void apache::geode::client::PersistenceManager::close |
( |
| ) |
|
|
pure virtual |
Closes the persistence manager instance.
- Exceptions
-
ShutdownFailedException | if close is not successful. |
virtual void apache::geode::client::PersistenceManager::destroy |
( |
const CacheableKeyPtr & |
key, |
|
|
void *& |
PersistenceInfo |
|
) |
| |
|
pure virtual |
destroys the entry specified by the key in the argument.
- Parameters
-
key | is the key of the entry which is being destroyed. |
PersistenceInfo | related persistence information. |
- Exceptions
-
RegionDestroyedException | is the region is already destroyed. |
EntryNotFoundException | if the entry is not found on the disk. |
public methods
Returns the current persistence manager.
- Returns
- persistence manager
virtual void apache::geode::client::PersistenceManager::init |
( |
const RegionPtr & |
region, |
|
|
PropertiesPtr & |
diskProperties |
|
) |
| |
|
pure virtual |
This method gets called after an implementation object is created.
Initializes all the implementation specific environments needed.
- Exceptions
-
InitfailedException | if the persistence manager cannot be initialized. |
void apache::geode::client::SharedBase::preserveSB |
( |
| ) |
const |
|
inherited |
Atomically increment reference count.
Reads the value for the key from the disk.
- Parameters
-
key | is the key for which the value has to be read. |
PersistenceInfo | related persistence information. |
- Returns
- value of type CacheablePtr.
- Exceptions
-
DiskCorruptException | if the data to be read is corrupt. |
virtual bool apache::geode::client::PersistenceManager::readAll |
( |
| ) |
|
|
pure virtual |
Reads all the values from the region.
- Returns
- true
int32_t apache::geode::client::SharedBase::refCount |
( |
| ) |
|
|
inlineinherited |
- Returns
- the reference count
void apache::geode::client::SharedBase::releaseSB |
( |
| ) |
const |
|
inherited |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
virtual void apache::geode::client::PersistenceManager::write |
( |
const CacheableKeyPtr & |
key, |
|
|
const CacheablePtr & |
value, |
|
|
void *& |
PersistenceInfo |
|
) |
| |
|
pure virtual |
Writes a key, value pair of region to the disk.
The actual file or database related write operations should be implemented in this method by the class implementing this method.
- Parameters
-
key | the key to write. |
value | the value to write |
PersistenceInfo | related persistence information. |
- Exceptions
-
RegionDestroyedException | is the region is already destroyed. |
OutofMemoryException | if the disk is full |
DiskFailureException | if the write fails due to disk fail. |
virtual bool apache::geode::client::PersistenceManager::writeAll |
( |
| ) |
|
|
pure virtual |
Writes all the entries for a region.
Refer persistance requirement doc for the use case.
- Exceptions
-
DiskFailureException | if the write fails due to disk fail. |
const RegionPtr apache::geode::client::PersistenceManager::m_regionPtr |
|
protected |
Region for this persistence manager.