Assembly: GemStone.GemFire.Cache (in GemStone.GemFire.Cache.dll) Version: 126.96.36.199
void Put( TKey key, TValue value, callbackArg )
void Put( TKey key, TValue value, Object callbackArg )
Sub Put ( _ key As TKey, _ value As TValue, _ callbackArg As _ )
Sub Put ( _ key As TKey, _ value As TValue, _ callbackArg As Object _ )
void Put( TKey key, TValue value, ^ callbackArg )
void Put( TKey key, TValue value, Object^ callbackArg )
- Type: TKey
a key object associated with the value to be put into this region.
- Type: TValue
the value to be put into this region
argument that is passed to the callback functions
|if key is null|
|if CacheWriter aborts the operation|
|if CacheListener throws an exception|
|if region has been destroyed|
|If an exception is received from the Java cache server. Only for Native Client regions.|
|if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it. For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.|
|if the operation timed out|
|if there is not enough memory for the value|
If there is already an entry associated with the specified key in this region, the entry's previous value is overwritten. The new put value is propogated to the java server to which it is connected with. Put is intended for very simple caching situations. In general it is better to create a ICacheLoader object and allow the cache to manage the creation and loading of objects. For local region instance - Puts a new value into an entry in this region in the local cache only. For distributed region instance - Puts a new value into an entry in this region and this operation is propogated to the Gemfire cache server to which it is connected with.
If remote server put fails throwing back a CacheServerException or security exception, then local put is tried to rollback. However, if the entry has overflowed/evicted/expired then the rollback is aborted since it may be due to a more recent notification or update by another thread.