GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue > Interface Template Reference


Detailed Description

template<class TKey, class TValue>
interface GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >

IPersistenceManager interface 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.

Public Member Functions

void Close ()
void Destroy (TKey key)
void Init (IRegion< TKey, TValue >^region, Properties< String^ , String^ >^diskProperties)
TValue Read (TKey key)
bool ReadAll ()
void Write (TKey key, TValue value)
bool WriteAll ()

Member Function Documentation

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::Close (  ) 

Closes the persistence manager instance.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::Destroy ( TKey  key  ) 

Destroys the entry specified by the key in the argument.

Parameters:
key key of the entry which is being destroyed.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::Init ( IRegion< TKey, TValue >^  region,
Properties< String^ , String^ >^  diskProperties 
)

Called after an implementation object is created. Initializes all the implementation specific environments needed.

Parameters:
region Region for which this PersistenceManager is initialized.
diskProperties Configuration Properties used by PersistenceManager implementation.

template<class TKey, class TValue>
TValue GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::Read ( TKey  key  ) 

Reads the value for the key from the disk.

Parameters:
key key for which the value has to be read.

template<class TKey, class TValue>
bool GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::ReadAll (  ) 

Reads all the values from the region.

Returns:
true if ReadAll is successful.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::Write ( TKey  key,
TValue  value 
)

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.

template<class TKey, class TValue>
bool GemStone::GemFire::Cache::Generic::IPersistenceManager< TKey, TValue >::WriteAll (  ) 

Writes all the entries for a region. Refer persistance requirement doc for the use case.

Returns:
true if WriteAll is successful.


GemFire C++ Cache .NET API Documentation