Cache storage convenience adapter. It provides default implementation for bulk operations, such as LoadAll
, PutAll
and RemoveAll
by sequentially calling corresponding Load
, Put
and Remove
operations. Use this adapter whenever such behaviour is acceptable. However in many cases it maybe more preferable to take advantage of database batch update functionality, and therefore default adapter implementation may not be the best option. Note that LoadCache
method has empty implementation because it is essentially up to the user to invoke it with specific arguments.
More...
|
virtual void | LoadCache (Action< object, object > act, params object[] args) |
| Loads all values from underlying persistent storage. Note that keys are not passed, so it is up to implementation to figure out what to load. This method is called whenever ICache<K,V>.LocalLoadCache method is invoked which is usually to preload the cache from persistent storage. More...
|
|
virtual IDictionary | LoadAll (ICollection keys) |
| Loads multiple objects. Application developers should implement this method to customize the loading of cache entries. This method is called when the requested object is not in the cache. If an object can't be loaded, it is not returned in the resulting map. More...
|
|
virtual void | WriteAll (IDictionary entries) |
| Writes all. More...
|
|
virtual void | DeleteAll (ICollection keys) |
| Remove data and keys from the external resource for the given collection of keys, if present. More...
|
|
virtual void | SessionEnd (bool commit) |
| Tells store to commit or rollback a transaction depending on the value of the commit parameter. More...
|
|
abstract object | Load (object key) |
| Loads an object. Application developers should implement this method to customize the loading of a value for a cache entry. This method is called by a cache when a requested entry is not in the cache. If the object can't be loaded null should be returned. More...
|
|
abstract void | Write (object key, object val) |
| Write the specified value under the specified key to the external resource. More...
|
|
abstract void | Delete (object key) |
| Delete the cache entry from the external resource. More...
|
|
abstract void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.Delete |
( |
object |
key | ) |
|
|
pure virtual |
Expiry of a cache entry is not a delete hence will not cause this method to be invoked.
This method is invoked even if no mapping for the key exists.
- Parameters
-
key | The key that is used for the delete operation. |
Implements Apache.Ignite.Core.Cache.Store.ICacheStore.
virtual void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.DeleteAll |
( |
ICollection |
keys | ) |
|
|
virtual |
The order that individual deletes occur is undefined.
If this operation fails (by throwing an exception) after a partial success, the writer must remove any successfully written entries from the entries collection so that the caching implementation knows what succeeded and can mutate the cache.
Expiry of a cache entry is not a delete hence will not cause this method to be invoked.
This method may include keys even if there is no mapping for that key, in which case the data represented by that key should be removed from the underlying resource.
- Parameters
-
keys | a mutable collection of keys for entries to delete. Upon invocation, it contains the keys to delete for write-through. Upon return the collection must only contain the keys that were not successfully deleted. |
Implements Apache.Ignite.Core.Cache.Store.ICacheStore.
abstract object Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.Load |
( |
object |
key | ) |
|
|
pure virtual |
- Parameters
-
key | The key identifying the object being loaded. |
- Returns
- The value for the entry that is to be stored in the cache or
null
if the object can't be loaded
Implements Apache.Ignite.Core.Cache.Store.ICacheStore.
virtual IDictionary Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.LoadAll |
( |
ICollection |
keys | ) |
|
|
virtual |
virtual void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.LoadCache |
( |
Action< object, object > |
act, |
|
|
params object[] |
args |
|
) |
| |
|
virtual |
This method is optional, and cache implementation does not depend on this method to do anything.
For every loaded value method provided action should be called. The action will then make sure that the loaded value is stored in cache.
- Parameters
-
Implements Apache.Ignite.Core.Cache.Store.ICacheStore.
virtual void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.SessionEnd |
( |
bool |
commit | ) |
|
|
virtual |
abstract void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.Write |
( |
object |
key, |
|
|
object |
val |
|
) |
| |
|
pure virtual |
virtual void Apache.Ignite.Core.Cache.Store.CacheStoreAdapter.WriteAll |
( |
IDictionary |
entries | ) |
|
|
virtual |