VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
PersistenceManager API for persistence and overflow. More...
#include <PersistenceManager.hpp>
Public Member Functions | |
| virtual void | close ()=0 |
| Closes the persistence manager instance. | |
| virtual void | destroy (const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< void > &PersistenceInfo)=0 |
| destroys the entry specified by the key in the argument. | |
| virtual void | init (const std::shared_ptr< Region > ®ion, const std::shared_ptr< Properties > &diskProperties)=0 |
| This method gets called after an implementation object is created. | |
| virtual std::shared_ptr< Cacheable > | read (const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< void > &PersistenceInfo)=0 |
| Reads the value for the key from the disk. | |
| virtual bool | readAll ()=0 |
| Reads all the values from the region. | |
| virtual void | write (const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< Cacheable > &value, std::shared_ptr< void > &persistenceInfo)=0 |
| Writes a key, value pair of region to the disk. | |
| virtual bool | writeAll ()=0 |
| Writes all the entries for a region. | |
Static Public Member Functions | |
| static std::shared_ptr< PersistenceManager > | getPersistenceManager () |
| Returns the current persistence manager. | |
Protected Attributes | |
| std::shared_ptr< Region > | m_regionPtr |
| Region for this persistence manager. | |
Detailed Description
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.
Member Function Documentation
◆ close()
|
pure virtual |
Closes the persistence manager instance.
- Exceptions
-
ShutdownFailedException if close is not successful.
◆ destroy()
|
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.
◆ getPersistenceManager()
|
static |
Returns the current persistence manager.
- Returns
- persistence manager
◆ init()
|
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.
◆ read()
|
pure virtual |
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 std::shared_ptr<Cacheable>.
- Exceptions
-
DiskCorruptException if the data to be read is corrupt.
◆ readAll()
|
pure virtual |
Reads all the values from the region.
- Returns
- true
◆ write()
|
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.
◆ 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.
Field Documentation
◆ m_regionPtr
Apache Geode C++ Cache API Documentation