GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue > Class Template Reference

Inherits GemStone::GemFire::Cache::Generic::Internal::SBWrap< gemfire::AttributesMutator >.


Detailed Description

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

Supports modification of certain region attributes after the region has been created.

It is required that the attributes be completely initialized using an AttributesFactory before creating the region. AttributesMutator can be applied to adjusting and tuning a subset of attributes that are modifiable at runtime.

The setter methods all return the previous value of the attribute.

See also:
Region.AttributesMutator, RegionAttributes, AttributesFactory


Public Member Functions

void SetCacheListener (String^ libPath, String^ factoryFunctionName)
void SetCacheListener (ICacheListener< TKey, TValue >^cacheListener)
void SetCacheLoader (String^ libPath, String^ factoryFunctionName)
void SetCacheLoader (ICacheLoader< TKey, TValue >^cacheLoader)
void SetCacheWriter (String^ libPath, String^ factoryFunctionName)
void SetCacheWriter (ICacheWriter< TKey, TValue >^cacheWriter)
int32_t SetEntryIdleTimeout (int32_t idleTimeout)
ExpirationAction SetEntryIdleTimeoutAction (ExpirationAction action)
int32_t SetEntryTimeToLive (int32_t timeToLive)
ExpirationAction SetEntryTimeToLiveAction (ExpirationAction action)
uint32_t SetLruEntriesLimit (uint32_t entriesLimit)
int32_t SetRegionIdleTimeout (int32_t idleTimeout)
ExpirationAction SetRegionIdleTimeoutAction (ExpirationAction action)
int32_t SetRegionTimeToLive (int32_t timeToLive)
ExpirationAction SetRegionTimeToLiveAction (ExpirationAction action)

Protected Member Functions

void _SetNativePtr (gemfire::AttributesMutator *nativeptr)
void AssignPtr (gemfire::AttributesMutator *nativeptr)
void InternalCleanup ()
void SetPtr (gemfire::AttributesMutator *nativeptr)

Member Function Documentation

void GemStone::GemFire::Cache::Generic::Internal::SBWrap< gemfire::AttributesMutator >::_SetNativePtr ( gemfire::AttributesMutator *  nativeptr  )  [inline, protected, inherited]

Set the native pointer to the new object without doing a preserveSB(). DO NOT USE UNLESS YOU KNOW WHAT YOU ARE DOING.

void GemStone::GemFire::Cache::Generic::Internal::SBWrap< gemfire::AttributesMutator >::AssignPtr ( gemfire::AttributesMutator *  nativeptr  )  [inline, protected, inherited]

Used to assign the native pointer to a new object.

Note the order of preserveSB() and releaseSB(). This handles the corner case when m_nativeptr is same as nativeptr.

void GemStone::GemFire::Cache::Generic::Internal::SBWrap< gemfire::AttributesMutator >::InternalCleanup (  )  [inline, protected, inherited]

Internal cleanup function invoked by dispose/finalizer.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheListener ( String^   libPath,
String^   factoryFunctionName 
)

Sets the library path for the library that will be invoked for the listener of the region. The previous cache listener will be replaced with a listener created using the factory function provided in the given library.

Parameters:
libPath library pathname containing the factory function.
factoryFunctionName Name of factory function that creates a CacheListener for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheListener for a managed library.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheListener ( ICacheListener< TKey, TValue >^  cacheListener  ) 

Sets the CacheListener for the region. The previous cache listener (if any) will be replaced with the given cacheListener.

Parameters:
cacheListener user-defined cache listener, or null for no cache listener

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheLoader ( String^   libPath,
String^   factoryFunctionName 
)

Sets the library path for the library that will be invoked for the loader of the region. The previous cache loader will be replaced with a loader created using the factory function provided in the given library.

Parameters:
libPath library pathname containing the factory function.
factoryFunctionName Name of factory function that creates a CacheLoader for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheLoader for a managed library.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheLoader ( ICacheLoader< TKey, TValue >^  cacheLoader  ) 

Sets the CacheLoader for the region. The previous cache loader (if any) will be replaced with the given cacheLoader.

Parameters:
cacheLoader user-defined cache loader, or null for no cache loader

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheWriter ( String^   libPath,
String^   factoryFunctionName 
)

Sets the library path for the library that will be invoked for the writer of the region. The previous cache writer will be replaced with a writer created using the factory function provided in the given library.

Parameters:
libPath library pathname containing the factory function.
factoryFunctionName Name of factory function that creates a CacheWriter for a native library, or the name of the method in the form {Namespace}.{Class Name}.{Method Name} that creates an ICacheWriter for a managed library.

template<class TKey, class TValue>
void GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetCacheWriter ( ICacheWriter< TKey, TValue >^  cacheWriter  ) 

Sets the CacheListener for the region. The previous cache writer (if any) will be replaced with the given cacheWriter.

Parameters:
cacheWriter user-defined cache writer, or null for no cache writer

template<class TKey, class TValue>
int32_t GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetEntryIdleTimeout ( int32_t  idleTimeout  ) 

Sets the idleTimeout duration for region entries.

Parameters:
idleTimeout the idleTimeout in seconds for entries in this region, or 0 for no idle timeout
Returns:
the previous value
Exceptions:
IllegalStateException if the new idleTimeout changes entry expiration from disabled to enabled or enabled to disabled.

template<class TKey, class TValue>
ExpirationAction GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetEntryIdleTimeoutAction ( ExpirationAction  action  ) 

Sets the idleTimeout action for region entries.

Parameters:
action the idleTimeout action for entries in this region
Returns:
the previous action

template<class TKey, class TValue>
int32_t GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetEntryTimeToLive ( int32_t  timeToLive  ) 

Sets the timeToLive duration for region entries.

Parameters:
timeToLive the timeToLive in seconds for entries in this region, or 0 to disable time-to-live
Returns:
the previous value
Exceptions:
IllegalStateException if the new timeToLive changes entry expiration from disabled to enabled or enabled to disabled

template<class TKey, class TValue>
ExpirationAction GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetEntryTimeToLiveAction ( ExpirationAction  action  ) 

Set the timeToLive action for region entries.

Parameters:
action the timeToLive action for entries in this region
Returns:
the previous action

template<class TKey, class TValue>
uint32_t GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetLruEntriesLimit ( uint32_t  entriesLimit  ) 

Sets the maximum entry count in the region before LRU eviction.

Parameters:
entriesLimit the number of entries to allow, or 0 to disable LRU
Returns:
the previous value
Exceptions:
IllegalStateException if the new entriesLimit changes LRU from disabled to enabled or enabled to disabled.

void GemStone::GemFire::Cache::Generic::Internal::SBWrap< gemfire::AttributesMutator >::SetPtr ( gemfire::AttributesMutator *  nativeptr  )  [inline, protected, inherited]

Used to set the native pointer to a new object. This should only be used when you know that the underlying object is NULL.

template<class TKey, class TValue>
int32_t GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetRegionIdleTimeout ( int32_t  idleTimeout  ) 

Sets the idleTimeout duration for the region itself.

Parameters:
idleTimeout the idleTimeout for this region, in seconds, or 0 to disable idle timeout
Returns:
the previous value
Exceptions:
IllegalStateException if the new idleTimeout changes region expiration from disabled to enabled or enabled to disabled.

template<class TKey, class TValue>
ExpirationAction GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetRegionIdleTimeoutAction ( ExpirationAction  action  ) 

Sets the idleTimeout action for the region itself.

Parameters:
action the idleTimeout action for this region
Returns:
the previous action

template<class TKey, class TValue>
int32_t GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetRegionTimeToLive ( int32_t  timeToLive  ) 

Sets the timeToLive duration for the region itself.

Parameters:
timeToLive the timeToLive for this region, in seconds, or 0 to disable time-to-live
Returns:
the previous value
Exceptions:
IllegalStateException if the new timeToLive changes region expiration from disabled to enabled or enabled to disabled.

template<class TKey, class TValue>
ExpirationAction GemStone::GemFire::Cache::Generic::AttributesMutator< TKey, TValue >::SetRegionTimeToLiveAction ( ExpirationAction  action  ) 

Sets the timeToLive action for the region itself.

Parameters:
action the timeToLiv eaction for this region
Returns:
the previous action


GemFire C++ Cache .NET API Documentation