|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alachisoft.ncache.web.caching.Cache<K,V>
K
- V
- public final class Cache<K,V>
Implements the clustered cache for an application. This class cannot be inherited.
Nested Class Summary | |
---|---|
class |
Cache.Entry<K,V>
|
Field Summary | |
---|---|
static java.util.Date |
NoAbsoluteExpiration
specify no absulute expiration. |
static TimeSpan |
NoLockingExpiration
Disable lock expiration |
static TimeSpan |
NoSlidingExpiration
specify no siliding expiration. |
Method Summary | |
---|---|
CacheItemVersion |
add(java.lang.String key,
CacheItem item)
Add a CacheItem to the cache |
CacheItemVersion |
add(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
DataSourceItemsAddedCallback onDataSourceItemAdded)
Adds the specified item to the Cache, and a delegate you can use to notify your application when the item is added into cache. |
CacheItemVersion |
add(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsAddedCallback onDataSourceItemAdded)
Adds the specified item to the Cache, and a delegate you can use to notify your application when the item is added into cache. |
CacheItemVersion |
add(java.lang.String key,
java.lang.Object value)
Adds an item into the Cache object with a cache key to reference its location. |
CacheItemVersion |
add(java.lang.String key,
java.lang.Object value,
CacheDependency dependency,
java.util.Date absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority)
Adds the specified item to the Cache object with dependencies, expiration and priority policies, and a delegate you can use to notify your application when the inserted item is removed from the Cache. |
CacheItemVersion |
add(java.lang.String key,
java.lang.Object value,
NamedTagsDictionary namedTags)
Adds an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. |
CacheItemVersion |
add(java.lang.String key,
java.lang.Object value,
java.lang.String group,
java.lang.String subGroup)
Adds an item in the cache. |
CacheItemVersion |
add(java.lang.String key,
java.lang.Object value,
Tag[] tags)
Adds an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. |
java.lang.Object |
addAsync(java.lang.String key,
CacheItem item)
Adds a key and CacheItem in the cache Asynchronously. |
java.lang.Object |
addAsync(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
DataSourceItemsAddedCallback onSourceItemAdded)
Adds a key and CacheItem in the cache Asynchronously. |
java.lang.Object |
addAsync(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsAddedCallback onSourceItemAdded)
Adds a key and CacheItem in the cache Asynchronously. |
java.lang.Object |
addAsync(java.lang.String key,
java.lang.Object value,
AsyncItemAddedCallback onAsyncItemAddCallback,
java.lang.String group,
java.lang.String subGroup)
Add a key value pair to the cache asynchronously. |
java.util.HashMap |
addBulk(java.lang.String[] keys,
CacheItem[] items,
DSWriteOption dsWriteOption,
DataSourceItemsAddedCallback onDataSourceItemAddedCallback)
Add array of CacheItem to the cache. |
java.util.HashMap |
addBulk(java.lang.String[] keys,
CacheItem[] items,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsAddedCallback onDataSourceItemAddedCallback)
Add array of CacheItem to the cache. |
void |
addCacheEventListener(com.alachisoft.ncache.event.CacheListener l)
Adds the specified cache listener to receive cache events from this cache. |
void |
addClusterEventListener(com.alachisoft.ncache.event.ClusterListener l)
Adds the specified cluster listener to receive custom cache events from this cache. |
void |
addCustomEventListener(com.alachisoft.ncache.event.CustomListener l)
Adds the specified custom listener to receive custom cache events from this cache. |
boolean |
addDependency(java.lang.String key,
CacheDependency dep,
boolean isResyncRequired)
Add dependency to the cache item. |
boolean |
addDependency(java.lang.String key,
CacheSyncDependency dep)
Add CacheSyncDependency to the cache item. |
void |
clear()
Removes all elements from the Cache. |
void |
clear(DSWriteOption dsWriteOption,
DataSourceClearedCallback onDataSourceCleared)
Removes all elements from the Cache. |
void |
clearAsync(DSWriteOption dsWriteOption,
AsyncCacheClearedCallback onAsyncCacheCleared,
DataSourceClearedCallback onDataSourceCleared)
Removes all elements from the Cache asynchronously. |
void |
clearClientCache()
Clears Client Cache if initialized |
boolean |
contains(java.lang.String key)
Determines whether the cache contains a specific key. |
void |
delete(java.lang.String key)
Removes the object from the Cache. |
void |
delete(java.lang.String key,
CacheItemVersion version)
Removes an item from cache if the specified version is still the most recent version in the cache. |
void |
delete(java.lang.String key,
DSWriteOption dsWriteOption,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
void |
delete(java.lang.String key,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
void |
delete(java.lang.String key,
LockHandle lockHandle)
Removes an item from cache if it is not already locked or if the correct lock-id is specified. |
void |
deleteBulk(java.lang.String[] keys,
DSWriteOption dsWriteOption,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the objects from the Cache. |
void |
deleteBulk(java.lang.String[] keys,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the objects from the Cache. |
void |
dispose()
Disposes this cache instance. |
java.lang.Object |
get(java.lang.String key)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
CacheItemVersion version)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
DSReadOption dsReadOption,
CacheItemVersion version)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
java.lang.String providerName,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
java.lang.String providerName,
DSReadOption dsReadOption,
CacheItemVersion version)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
java.lang.String group,
java.lang.String subGroup,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
java.lang.Object |
get(java.lang.String key,
TimeSpan lockTimeout,
LockHandle lockHandle,
boolean acquireLock)
Retrieves the specified item from the Cache object if it is not already locked. |
java.util.HashMap |
getBulk(java.lang.String[] keys,
DSReadOption dsReadOption)
Retrieves the object from the cache for the given keys as key value pairs |
java.util.HashMap |
getBulk(java.lang.String[] keys,
java.lang.String provideName,
DSReadOption dsReadOption)
Retrieves the object from the cache for the given keys as key value pairs |
java.util.HashMap |
getByAllTags(Tag[] tags)
Returns the cached objects that have all the same tags in common. |
java.util.HashMap |
getByAnyTag(Tag[] tags)
Returns the cached objects that have any of the same tags in common. |
java.util.HashMap |
getByTag(Tag tag)
Gets all the cached objects with the specified tag. |
CacheItem |
getCacheItem(java.lang.String key)
Get the cache item stored in cache. |
CacheItem |
getCacheItem(java.lang.String key,
CacheItemVersion version)
Retrieves the specified item from the Cache object. |
CacheItem |
getCacheItem(java.lang.String key,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
CacheItem |
getCacheItem(java.lang.String key,
DSReadOption dsReadOption,
CacheItemVersion version)
|
CacheItem |
getCacheItem(java.lang.String key,
java.lang.String providerName,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
CacheItem |
getCacheItem(java.lang.String key,
java.lang.String providerName,
DSReadOption dsReadOption,
CacheItemVersion version)
Retrieves the specified item from the Cache object. |
CacheItem |
getCacheItem(java.lang.String key,
java.lang.String group,
java.lang.String subGroup)
Get the cache item stored in cache. |
CacheItem |
getCacheItem(java.lang.String key,
java.lang.String group,
java.lang.String subGroup,
DSReadOption dsReadOption)
Retrieves the specified item from the Cache object. |
CacheItem |
getCacheItem(java.lang.String key,
TimeSpan lockTimeout,
LockHandle lockHandle,
boolean acquireLock)
Get the cache item stored in cache. |
CacheStream |
getCacheStream(java.lang.String key,
StreamMode streamMode)
Get Cache Stream based on mode. |
CacheStream |
getCacheStream(java.lang.String key,
StreamMode streamMode,
CacheItemPriority priority)
Gets an instance of the CacheStream class. |
CacheStream |
getCacheStream(java.lang.String key,
StreamMode streamMode,
java.util.Date absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority)
Get Cache Stream based on mode. |
CacheStream |
getCacheStream(java.lang.String key,
java.lang.String group,
java.lang.String subGroup,
StreamMode streamMode,
CacheDependency dependency,
java.util.Date absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority)
Get Cache Stream based on mode. |
CacheStream |
getCacheStream(java.lang.String key,
java.lang.String group,
java.lang.String subgroup,
StreamMode streamMode,
CacheItemPriority priority)
Gets an instance of the CacheStream class. |
CacheStream |
getCacheStream(java.lang.String key,
java.lang.String group,
java.lang.String subgroup,
StreamMode streamMode,
java.util.Date absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority)
Gets an instance of the CacheStream class. |
boolean |
getClientCacheStatus()
|
long |
getCount()
Returns the cache count. |
java.util.Enumeration |
getEnumerator()
|
java.util.HashMap |
getGroupData(java.lang.String group,
java.lang.String subGroup)
Retrieves the key and value pairs in a group or sub group. |
java.util.Collection |
getGroupKeys(java.lang.String group,
java.lang.String subGroup)
Retrieves the key and value pairs in a group or sub group. |
java.lang.Object |
getIfNewer(java.lang.String key,
CacheItemVersion version)
Gets an object from the cache only if a newer version of the object exists in cache. |
java.lang.Object |
getIfNewer(java.lang.String key,
java.lang.String group,
java.lang.String subGroup,
CacheItemVersion version)
Gets an object from the cache only if a newer version of the object exists in cache. |
java.util.Collection |
getKeysByAllTags(Tag[] tags)
Returns the cached objects that have all the same tags in common. |
java.util.Collection |
getKeysByAnyTag(Tag[] tags)
Returns the cached objects that have any of the same tags in common. |
java.util.Collection |
getKeysByTag(Tag tag)
Gets all the cached objects with the specified tag. |
CacheItemVersion |
insert(java.lang.String key,
CacheItem item)
Add a CacheItem to the cache |
CacheItemVersion |
insert(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Add a CacheItem to the cache |
CacheItemVersion |
insert(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Add a CacheItem to the cache |
CacheItemVersion |
insert(java.lang.String key,
CacheItem item,
LockHandle lockHandle,
boolean releaseLock)
|
CacheItemVersion |
insert(java.lang.String key,
java.lang.Object value)
Inserts an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. |
CacheItemVersion |
insert(java.lang.String key,
java.lang.Object value,
CacheDependency dependency,
java.util.Date absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority)
Inserts an object into the Cache with dependencies and expiration policies. |
CacheItemVersion |
insert(java.lang.String key,
java.lang.Object value,
NamedTagsDictionary namedTags)
Inserts an item into the Cache with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. |
CacheItemVersion |
insert(java.lang.String key,
java.lang.Object value,
java.lang.String group,
java.lang.String subGroup)
Inserts an Object into the Cache. |
CacheItemVersion |
insert(java.lang.String key,
java.lang.Object value,
Tag[] tags)
Inserts an item into the Cache with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. |
void |
insertAsync(java.lang.String key,
CacheItem item,
DSWriteOption dsWriteOption,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Inserts a key and CacheItem in the cache. |
void |
insertAsync(java.lang.String key,
CacheItem item,
java.lang.String providerName,
DSWriteOption dsWriteOption,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Inserts a key and CacheItem in the cache. |
void |
insertAsync(java.lang.String key,
java.lang.Object value,
AsyncItemUpdatedCallback asyncItemUpdatedCallback,
java.lang.String group,
java.lang.String subGroup)
Insert a CacheItem to the cache asynchoronously |
java.util.HashMap |
insertBulk(java.lang.String[] keys,
CacheItem[] items,
DSWriteOption dsWriteOption,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Insert list of CacheItem to the cache |
java.util.HashMap |
insertBulk(java.lang.String[] keys,
CacheItem[] items,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
Insert list of CacheItem to the cache |
boolean |
isExceptionsEnabled()
If this property is set the Cache object throws exceptions from public operations. |
boolean |
lock(java.lang.String key,
TimeSpan lockTimeout,
LockHandle lockHandle)
Acquire a lock on an item in cache. |
void |
raiseCustomEvent(java.lang.Object key,
java.lang.Object value)
Raises a custom event. |
void |
registerAddNotification()
Registers the Add operation notification with the server. |
void |
registerCacheStoppedNotification()
Register the cache stopped event with the server. |
void |
registerClearNotification()
Registers the Clear operation notification with the server. |
void |
registerCQ(ContinuousQuery query)
Registers the notifications based on the specified ContinuousQuery. |
void |
registerCustomNotification()
Registers the Clear operation notification with the server. |
void |
registerInsertNotification()
Registers the Insert operation notification with the server. |
void |
registerKeyNotificationCallback(java.lang.String[] keys,
CacheItemUpdatedCallback updateCallback,
CacheItemRemovedCallback removeCallback)
Registers the CacheItemUpdatedCallback and/or CacheItemRemovedCallback for the list of specified keys. |
void |
registerKeyNotificationCallback(java.lang.String key,
CacheItemUpdatedCallback updateCallback,
CacheItemRemovedCallback removeCallback)
Registers the CacheItemUpdatedCallback and/or CacheItemRemovedCallback for the specified key. |
void |
registerMemberJoinedNotification()
Registers the Member Joined notification with the server. |
void |
registerMemberLeftNotification()
Registers the Member Left notification with the server. |
void |
registerRemoveNotification()
Registers the Remove operation notification with the server. |
java.lang.Object |
remove(java.lang.String key)
Removes the object from the Cache. |
java.lang.Object |
remove(java.lang.String key,
CacheItemVersion version)
Removes an item from cache if the specified version is still the most recent version in the cache. |
java.lang.Object |
remove(java.lang.String key,
DSWriteOption dsWriteOption,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
java.lang.Object |
remove(java.lang.String key,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
java.lang.Object |
remove(java.lang.String key,
LockHandle lockHandle)
Removes an item from cache if it is not already locked or if the correct lock-id is specified. |
void |
removeAsync(java.lang.String key,
AsyncItemRemovedCallback asyncItemRemovedCallback,
DSWriteOption dsWriteOption,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
void |
removeAsync(java.lang.String key,
AsyncItemRemovedCallback asyncItemRemovedCallback,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the object from the Cache. |
java.util.HashMap |
removeBulk(java.lang.String[] keys,
DSWriteOption dsWriteOption,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the objects from the Cache. |
java.util.HashMap |
removeBulk(java.lang.String[] keys,
DSWriteOption dsWriteOption,
java.lang.String providerName,
DataSourceItemsRemovedCallback onDataSourceItemRemoved)
Removes the objects from the Cache. |
void |
removeByAllTags(Tag[] tags)
Removes the cached objects that have all of the same tags in common. |
void |
removeByAnyTag(Tag[] tags)
Removes the cached objects that have any of the same tags in common. |
void |
removeByTag(Tag tag)
Removes the cached objects that have the specified tag. |
void |
removeCacheEventListener(com.alachisoft.ncache.event.CacheListener l)
Removes the specified Cache listener so that it no longer receives cache events from this cache. |
void |
removeClusterEventListener(com.alachisoft.ncache.event.CustomListener l)
Removes the specified cluster listener so that it no longer receives cache events from this cache. |
void |
removeCustomEventListener(com.alachisoft.ncache.event.CustomListener l)
Removes the specified custom listener so that it no longer receives cache events from this cache. |
void |
removeGroupData(java.lang.String group,
java.lang.String subGroup)
Remove the group from cache. |
java.util.Collection |
search(java.lang.String query,
java.util.HashMap values)
Retrieves the keys for the specified query. |
java.util.Collection |
searchCQ(ContinuousQuery query)
Performs search on the Cache based on the specified ContinuousQuery and registers the notifications. |
java.util.HashMap |
searchEntries(java.lang.String query,
java.util.HashMap values)
Retrieves the key and value pairs for the specified query. |
java.util.HashMap |
searchEntriesCQ(ContinuousQuery query)
Performs search on the Cache based on the specified ContinuousQuery and registers the notifications. |
void |
setExceptionsEnabled(boolean exceptionsEnabled)
If this property is set the Cache object throws exceptions from public operations. |
java.lang.String |
toString()
|
void |
unlock(java.lang.String key)
Forcefully unlocks a locked cached item. |
void |
unlock(java.lang.String key,
java.lang.String lockId)
Unlocks a locked cached item if the correct lock-id is specified. |
void |
unRegisterAddNotification()
Unregisters the Add operation notification with the server. |
void |
unRegisterCacheStoppedNotification()
Unregisters the cache stopped even notification with the server. |
void |
unRegisterClearNotification()
Unregisters the Clear operation notification with the server. |
void |
unRegisterCQ(ContinuousQuery query)
Unregisters notifications for the specified ContinuousQuery. |
void |
unRegisterCustomNotification()
Registers the Clear operation notification with the server. |
void |
unRegisterInsertNotification()
Unregisters the Insert operation notification with the server. |
void |
unRegisterKeyNotificationCallback(java.lang.String[] keys,
CacheItemUpdatedCallback updateCallback,
CacheItemRemovedCallback removeCallback)
Unregisters the CacheItemUpdatedCallback and/or CacheItemRemovedCallback already registered
for the specified list of keys. |
void |
unRegisterKeyNotificationCallback(java.lang.String key,
CacheItemUpdatedCallback updateCallback,
CacheItemRemovedCallback removeCallback)
Unregisters the CacheItemUpdatedCallback and/or CacheItemRemovedCallback already registered for the specified key. |
void |
unRegisterMemberLeftNotification()
Unregisters the Memeber Left Event notification with the server. |
void |
unRegisterMemeberJoinedNotification()
Unregisters the Member Joined Event notification with the server. |
void |
unRegisterRemoveNotification()
Unregisters the Remove operation notification with the server. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.util.Date NoAbsoluteExpiration
public static final TimeSpan NoLockingExpiration
public static TimeSpan NoSlidingExpiration
Method Detail |
---|
public CacheItemVersion add(java.lang.String key, CacheItem item) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- CacheItem to add in the cache
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItemVersion add(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, DataSourceItemsAddedCallback onDataSourceItemAdded) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.dsWriteOption
- option regarding updating data source.onDataSourceItemAdded
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion add(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsAddedCallback onDataSourceItemAdded) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemAdded
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion add(java.lang.String key, java.lang.Object value) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The item to be added to the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion add(java.lang.String key, java.lang.Object value, CacheDependency dependency, java.util.Date absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The item to be added to the cache.dependency
- The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.absoluteExpiration
- The time at which the added object expires and is removed from the cache.slidingExpiration
- The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.priority
- The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion add(java.lang.String key, java.lang.Object value, NamedTagsDictionary namedTags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- Value to add in the cachenamedTags
- to associate with object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.NamedTagsDictionary
public CacheItemVersion add(java.lang.String key, java.lang.Object value, java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.group
- The data group of the itemsubGroup
- The data group of the itemvalue
- The value to be added in the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.public CacheItemVersion add(java.lang.String key, java.lang.Object value, Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- Value to add in the cachetags
- An array of Tags to associate with the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.Tag
public java.lang.Object addAsync(java.lang.String key, CacheItem item) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- CacheItem to be added in the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public java.lang.Object addAsync(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, DataSourceItemsAddedCallback onSourceItemAdded) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- CacheItem to be added in the cache.dsWriteOption
- option regarding updating data source.onSourceItemAdded
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public java.lang.Object addAsync(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsAddedCallback onSourceItemAdded) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- CacheItem to be added in the cache.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onSourceItemAdded
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public java.lang.Object addAsync(java.lang.String key, java.lang.Object value, AsyncItemAddedCallback onAsyncItemAddCallback, java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The value to be added.onAsyncItemAddCallback
- Callback that returns the result of the operationgroup
- The data group of the itemsubGroup
- The data group of the item
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings. This excpetion is thrown when cache is unable to read or parse configuration filepublic java.util.HashMap addBulk(java.lang.String[] keys, CacheItem[] items, DSWriteOption dsWriteOption, DataSourceItemsAddedCallback onDataSourceItemAddedCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
keys
- The cache keys used to reference the items.items
- The items that are to be storeddsWriteOption
- option regarding updating data source.onDataSourceItemAddedCallback
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public java.util.HashMap addBulk(java.lang.String[] keys, CacheItem[] items, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsAddedCallback onDataSourceItemAddedCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
keys
- The cache keys used to reference the items.items
- The items that are to be storeddsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemAddedCallback
- callback, if provided, is called when item is added to data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public void addCacheEventListener(com.alachisoft.ncache.event.CacheListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the CacheListener
public void addClusterEventListener(com.alachisoft.ncache.event.ClusterListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the ClusterListener
public void addCustomEventListener(com.alachisoft.ncache.event.CustomListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the CustomListener
public boolean addDependency(java.lang.String key, CacheDependency dep, boolean isResyncRequired) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
isResyncRequired
- If true cache autmatically synchronizes this item with the database on expiration.key
- The cache key used to reference the item.dep
- CacheDependency to be added
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public boolean addDependency(java.lang.String key, CacheSyncDependency dep) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.dep
- CacheSyncDependency to be added
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void clear() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void clear(DSWriteOption dsWriteOption, DataSourceClearedCallback onDataSourceCleared) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
dsWriteOption
- option regarding updating data source.onDataSourceCleared
- callback; if provided, is called when data source is cleared.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void clearAsync(DSWriteOption dsWriteOption, AsyncCacheClearedCallback onAsyncCacheCleared, DataSourceClearedCallback onDataSourceCleared) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
dsWriteOption
- option regarding updating data source.onAsyncCacheCleared
- Callback that returns the result of the operationonDataSourceCleared
- callback; if provided, is called when data source is cleared.
GeneralFailureException
OperationFailedException
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void clearClientCache()
public boolean contains(java.lang.String key) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The key to locate in the Cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void delete(java.lang.String key) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void delete(java.lang.String key, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.version
- The version of the item to be removed. The item is removed from the cache
only if this is still the most recent version in the cache.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void delete(java.lang.String key, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.dsWriteOption
- option regarding updating data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void delete(java.lang.String key, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void delete(java.lang.String key, LockHandle lockHandle) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.lockHandle
- If the item is locked then, it can be removed only if the correct lockHandle is specified.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void deleteBulk(java.lang.String[] keys, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The cache keys used to reference the item.dsWriteOption
- option regarding updating data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void deleteBulk(java.lang.String[] keys, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The cache keys used to reference the item.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void dispose() throws GeneralFailureException, OperationFailedException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.version
- the version of the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, DSReadOption dsReadOption, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.dsReadOption
- Options regarding reading from data sourceversion
- he version of the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, java.lang.String providerName, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.providerName
- unique identifier for the data source.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, java.lang.String providerName, DSReadOption dsReadOption, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.providerName
- unique identifier for the data source.dsReadOption
- Options regarding reading from data sourceversion
- he version of the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, java.lang.String group, java.lang.String subGroup, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.group
- Group of the object.subGroup
- SubGroup of the object.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object get(java.lang.String key, TimeSpan lockTimeout, LockHandle lockHandle, boolean acquireLock) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrievelockTimeout
- The time span after which the lock is automatically releasedlockHandle
- An instance of LockHandle to hold the lock information. lockHandle will be
populated by cache.acquireLock
- A flag to determine whether to acquire a lock or not
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
{@codeThe following example demonstrates how to retrieve the cached value and acquire a lock at the same time
Cache theCache = NCache.initializeCache("myreplicatedcache");
theCache.Add("cachedItemKey", "cachedItemValue");
LockHandle lockHandle = new LockHandle();
object cachedItem = theCache.get("cachedItemKey", Cache.NoLockingExpiration, lockHandle, true);
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
}public java.util.HashMap getBulk(java.lang.String[] keys, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The keys against which items are to be fetched.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap getBulk(java.lang.String[] keys, java.lang.String provideName, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The keys against which items are to be fetched.provideName
- unique identifier for the data source.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap getByAllTags(Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tags
- An array of Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
java.lang.Exception
public java.util.HashMap getByAnyTag(Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tags
- An array of Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
java.lang.Exception
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.public java.util.HashMap getByTag(Tag tag) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tag
- The tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
java.lang.Exception
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.public CacheItem getCacheItem(java.lang.String key) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItem getCacheItem(java.lang.String key, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.version
- The version of the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.dsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, DSReadOption dsReadOption, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- key The identifier for the cache item to retrieve.dsReadOption
- Options regarding reading from data sourceversion
-
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, java.lang.String providerName, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.providerName
- A specific name for the data sourcedsReadOption
- Options regarding reading from data source
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, java.lang.String providerName, DSReadOption dsReadOption, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.providerName
- A specific name for the data sourcedsReadOption
- Options regarding reading from data source.version
- The version of the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.group
- The group whose keys are to be returned.subGroup
- The sub group of the group foe which keys are to be returned.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItem getCacheItem(java.lang.String key, java.lang.String group, java.lang.String subGroup, DSReadOption dsReadOption) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The identifier for the cache item to retrieve.group
- The name of the group which the item belongs to.subGroup
- The name of the subGroup within a group.dsReadOption
- Options regarding reading from data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItem getCacheItem(java.lang.String key, TimeSpan lockTimeout, LockHandle lockHandle, boolean acquireLock) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.lockTimeout
- The TimeSpan after which the lock is automatically released.lockHandle
- An instance of "LockHandle" to hold the lock information.acquireLock
- A flag to determine whether to acquire a lock or not.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheStream getCacheStream(java.lang.String key, StreamMode streamMode) throws java.lang.Exception
key
- The identifier for the cache item.streamMode
- Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLock
java.lang.Exception
- Thrown when an exception occurs while performing operation.public CacheStream getCacheStream(java.lang.String key, StreamMode streamMode, CacheItemPriority priority) throws java.lang.Exception
key
- The key used to reference the stream.streamMode
- Enumeration to specify the desired mode to open the stream.priority
- The relative cost of the object, as expressed by enumeration. The cache uses this value when it
evicts objects; objects with a lower cost are removed from the cache
before objects with a higher cost.
returns An instance of CacheStream
java.lang.Exception
public CacheStream getCacheStream(java.lang.String key, StreamMode streamMode, java.util.Date absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) throws java.lang.Exception
key
- The identifier for the cache item.streamMode
- Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLockabsoluteExpiration
- The time at which the added object expires and is removed from the cache.slidingExpiration
- The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.priority
- The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.
java.lang.Exception
- Thrown when an exception occurs while performing operation.public CacheStream getCacheStream(java.lang.String key, java.lang.String group, java.lang.String subGroup, StreamMode streamMode, CacheDependency dependency, java.util.Date absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) throws java.lang.Exception
key
- The identifier for the cache item.group
- The data group of the itemsubGroup
- The data group of the itemstreamMode
- Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLockdependency
- The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.absoluteExpiration
- The time at which the added object expires and is removed from the cache.slidingExpiration
- The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.priority
- The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.
java.lang.Exception
- Thrown when an exception occurs while performing operation.public CacheStream getCacheStream(java.lang.String key, java.lang.String group, java.lang.String subgroup, StreamMode streamMode, CacheItemPriority priority) throws java.lang.Exception
key
- The identifier for the cache item.group
- whose keys are to be returned.subgroup
- of the group foe which keys are to be returned.streamMode
- Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLockpriority
- The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.
java.lang.Exception
- Thrown when an exception occurs while performing operation.public CacheStream getCacheStream(java.lang.String key, java.lang.String group, java.lang.String subgroup, StreamMode streamMode, java.util.Date absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) throws java.lang.Exception
key
- The identifier for the cache item.group
- whose keys are to be returned.subgroup
- of the group foe which keys are to be returned.streamMode
- Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLockabsoluteExpiration
- The time at which the added object expires and is removed from the cache.slidingExpiration
- The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.priority
- The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.
java.lang.Exception
- Thrown when an exception occurs while performing operation.public boolean getClientCacheStatus()
public long getCount() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.Enumeration getEnumerator()
public java.util.HashMap getGroupData(java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
group
- The group whose keys are to be returned.subGroup
- The sub group of the group foe which keys are to be returned.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
OperationFailedException
- Thrown whenever an API fails.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.Collection getGroupKeys(java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
group
- The group whose keys are to be returned.subGroup
- The sub group of the group foe which keys are to be returned.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object getIfNewer(java.lang.String key, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- key used to reference the desired objectversion
- The version of the desired object passed by reference.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object getIfNewer(java.lang.String key, java.lang.String group, java.lang.String subGroup, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- key used to reference the desired objectgroup
- key used to reference the desired objectsubGroup
- The group of the cached objectversion
- The subGroup of the cached object
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
OperationFailedException
- Thrown whenever an API fails.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.Collection getKeysByAllTags(Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tags
- An array of Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
java.lang.Exception
public java.util.Collection getKeysByAnyTag(Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tags
- An array of Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
java.lang.Exception
public java.util.Collection getKeysByTag(Tag tag) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, java.lang.Exception
tag
- The tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
java.lang.Exception
public CacheItemVersion insert(java.lang.String key, CacheItem item) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
OperationFailedException
- Thrown whenever an API fails.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItemVersion insert(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.dsWriteOption
- option regarding updating data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItemVersion insert(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
OperationFailedException
- Thrown whenever an API fails.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItemVersion insert(java.lang.String key, CacheItem item, LockHandle lockHandle, boolean releaseLock) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item to be added to the cache.lockHandle
- An instance of LockHandle. If the item is locked, then it can be updated only if the correct lockHandle is specified.releaseLock
- A flag to determine whether or not release lock after operation is performed.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public CacheItemVersion insert(java.lang.String key, java.lang.Object value) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- the item to be added.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion insert(java.lang.String key, java.lang.Object value, CacheDependency dependency, java.util.Date absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The item to be added to the cache.dependency
- The file or cache key dependencies for the inserted object. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this parameter contains a null referenceabsoluteExpiration
- The time at which the added object expires and is removed from the cache.slidingExpiration
- The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.priority
-
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion insert(java.lang.String key, java.lang.Object value, NamedTagsDictionary namedTags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The item to be added to the cache.namedTags
- to associate with object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.NamedTagsDictionary
public CacheItemVersion insert(java.lang.String key, java.lang.Object value, java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- the value to be added in the cache.group
- the data group of the item.subGroup
- the data group of the item.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public CacheItemVersion insert(java.lang.String key, java.lang.Object value, Tag[] tags) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The item to be added to the cache.tags
- An array of Tag to associate with the object.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.Tag
public void insertAsync(java.lang.String key, CacheItem item, DSWriteOption dsWriteOption, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item that is to be storeddsWriteOption
- option regarding updating data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItem
public void insertAsync(java.lang.String key, CacheItem item, java.lang.String providerName, DSWriteOption dsWriteOption, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.item
- The item that is to be stored.providerName
- unique identifier for the data source.dsWriteOption
- option regarding updating data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.GeneralFailureException Thrown when an exception occurs during a clustered operation.
public void insertAsync(java.lang.String key, java.lang.Object value, AsyncItemUpdatedCallback asyncItemUpdatedCallback, java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
key
- The cache key used to reference the item.value
- The value to be added in teh cache.asyncItemUpdatedCallback
- group
- subGroup
-
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.public java.util.HashMap insertBulk(java.lang.String[] keys, CacheItem[] items, DSWriteOption dsWriteOption, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
keys
- The cache keys used to reference the items.items
- dsWriteOption
- option regarding updating data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.GeneralFailureException Thrown when an exception occurs during a clustered operation.
public java.util.HashMap insertBulk(java.lang.String[] keys, CacheItem[] items, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsUpdatedCallback onDataSourceItemUpdated) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException, ArgumentException
keys
- The cache keys used to reference the items.items
- providerName
- unique identifier for the data source.dsWriteOption
- option regarding updating data source.onDataSourceItemUpdated
- callback; if provided, is called when item is updated in data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ArgumentException
- Thrown when Operation was failed due to an invalid argument.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.GeneralFailureException Thrown when an exception occurs during a clustered operation.
public boolean isExceptionsEnabled()
public boolean lock(java.lang.String key, TimeSpan lockTimeout, LockHandle lockHandle) throws OperationFailedException, SecurityException, GeneralFailureException, AggregateException, ConfigurationException
key
- key of cached item to be locked.lockTimeout
- TimeSpan after which the lock is automatically released.lockHandle
- An instance of LockHandle that will be filled in with the lock information if lock is acquired successfully.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void raiseCustomEvent(java.lang.Object key, java.lang.Object value) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The key of the event.value
- The value.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerAddNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerCacheStoppedNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerClearNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerCQ(ContinuousQuery query) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- ContinuousQuery to register notifications for.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerCustomNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerInsertNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerKeyNotificationCallback(java.lang.String[] keys, CacheItemUpdatedCallback updateCallback, CacheItemRemovedCallback removeCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The list of the cache keys used to reference the cache items.updateCallback
- The CacheItemUpdatedCallback that is invoked if the item
with the specified key is updated in the cache.removeCallback
- The CacheItemRemovedCallback is invoked when the item with
the specified key is removed from the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItemUpdatedCallback
,
CacheItemRemovedCallback
public void registerKeyNotificationCallback(java.lang.String key, CacheItemUpdatedCallback updateCallback, CacheItemRemovedCallback removeCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the cache item.updateCallback
- The CacheItemUpdatedCallback that is invoked if the item
with the specified key is updated in the cache.removeCallback
- The CacheItemRemovedCallback is invoked when the item with
the specified key is removed from the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItemUpdatedCallback
,
CacheItemRemovedCallback
public void registerMemberJoinedNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerMemberLeftNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void registerRemoveNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object remove(java.lang.String key) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object remove(java.lang.String key, CacheItemVersion version) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.version
- The version of the item to be removed. The item is removed from the cache
only if this is still the most recent version in the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object remove(java.lang.String key, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.dsWriteOption
- option regarding updating data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object remove(java.lang.String key, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.lang.Object remove(java.lang.String key, LockHandle lockHandle) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.lockHandle
- If the item is locked then, it can be removed only if the correct lockHandle is specified.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void removeAsync(java.lang.String key, AsyncItemRemovedCallback asyncItemRemovedCallback, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.asyncItemRemovedCallback
- callback can be used by the client application to get the result of the Asynchronous Remove operationdsWriteOption
- option regarding updating data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
OperationFailedException
- Thrown whenever an API fails.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void removeAsync(java.lang.String key, AsyncItemRemovedCallback asyncItemRemovedCallback, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the item.asyncItemRemovedCallback
- callback can be used by the client application to get the result of the Asynchronous Remove operationdsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap removeBulk(java.lang.String[] keys, DSWriteOption dsWriteOption, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The cache keys used to reference the item.dsWriteOption
- option regarding updating data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException Thrown when an exception occurs during a clustered operation.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown if the user is not authorized to access cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap removeBulk(java.lang.String[] keys, DSWriteOption dsWriteOption, java.lang.String providerName, DataSourceItemsRemovedCallback onDataSourceItemRemoved) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
keys
- The cache keys used to reference the item.dsWriteOption
- option regarding updating data source.providerName
- unique identifier for the data source.onDataSourceItemRemoved
- callback; if provided, is called when item is removed from data source.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void removeByAllTags(Tag[] tags) throws GeneralFailureException, OperationFailedException, ArgumentNullException, AggregateException, SecurityException
tags
- - An array of Tag to search with.
GeneralFailureException
OperationFailedException
- Thrown whenever an API fails.
ArgumentNullException
SecurityException
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.public void removeByAnyTag(Tag[] tags) throws GeneralFailureException, OperationFailedException, ArgumentNullException, AggregateException, SecurityException
tags
- - An array of Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
ArgumentNullException
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.public void removeByTag(Tag tag) throws GeneralFailureException, OperationFailedException, ArgumentNullException, AggregateException, SecurityException
tag
- - A Tag to search with.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
OperationFailedException
- Thrown whenever an API fails.
SecurityException
ArgumentNullException
public void removeCacheEventListener(com.alachisoft.ncache.event.CacheListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the CacheListenerpublic void removeClusterEventListener(com.alachisoft.ncache.event.CustomListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the ClusterListenerpublic void removeCustomEventListener(com.alachisoft.ncache.event.CustomListener l)
l
is null
,
no exception is thrown and no action is performed.
l
- the CustomCacheListenerpublic void removeGroupData(java.lang.String group, java.lang.String subGroup) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
group
- group to be removed.subGroup
- subGroup to be removed.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.Collection search(java.lang.String query, java.util.HashMap values) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- The query to execute on the cache.values
- The HashMap of attribute names and values.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.Collection searchCQ(ContinuousQuery query) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- ContinuousQuery to perform the search and register notifications for.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap searchEntries(java.lang.String query, java.util.HashMap values) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- The query to execute on the cache.values
- The HashMap of attribute names and values.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public java.util.HashMap searchEntriesCQ(ContinuousQuery query) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- ContinuousQuery to perform the search and register notifications for.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void setExceptionsEnabled(boolean exceptionsEnabled)
exceptionsEnabled
- boolean value to enable/disable the exceptions.public java.lang.String toString()
toString
in class java.lang.Object
public void unlock(java.lang.String key) throws OperationFailedException, SecurityException, GeneralFailureException, AggregateException, ConfigurationException
key
- key of a cached item to be unlocked
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unlock(java.lang.String key, java.lang.String lockId) throws OperationFailedException, SecurityException, GeneralFailureException, AggregateException, ConfigurationException
key
- key of a cached item to be unlockedlockId
- An instance of LockHandle that was generated when lock was acquired
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterAddNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterCacheStoppedNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterClearNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterCQ(ContinuousQuery query) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
query
- ContinuousQuery to unregister notifications for.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterCustomNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterInsertNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterKeyNotificationCallback(java.lang.String[] keys, CacheItemUpdatedCallback updateCallback, CacheItemRemovedCallback removeCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
CacheItemUpdatedCallback
and/or CacheItemRemovedCallback
already registered
for the specified list of keys.
keys
- Keys to unregister.updateCallback
- CacheItemUpdatedCallback that is invoked when the item
with the specified key is updated in the cache.removeCallback
- acheItemRemovedCallback that is invoked when the item
with the key is removed from the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItemUpdatedCallback
,
CacheItemRemovedCallback
public void unRegisterKeyNotificationCallback(java.lang.String key, CacheItemUpdatedCallback updateCallback, CacheItemRemovedCallback removeCallback) throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
key
- The cache key used to reference the cache item.updateCallback
- CacheItemUpdatedCallback that is invoked when the item
with the specified key is updated in the cache.removeCallback
- CacheItemRemovedCallback that is invoked when the item
with the key is removed from the cache.
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.CacheItemUpdatedCallback
,
CacheItemRemovedCallback
public void unRegisterMemberLeftNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterMemeberJoinedNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.public void unRegisterRemoveNotification() throws GeneralFailureException, OperationFailedException, AggregateException, SecurityException, ConfigurationException
GeneralFailureException
- Thrown when an exception occurs during a clustered operation.
OperationFailedException
- Thrown whenever an API fails.
AggregateException
- This exception is thrown when multiple exceptions occur from multiple nodes. It combines all the exceptions as inner exceptions and throw it to the client application.
SecurityException
- Thrown when current user is not allowed to perform this operation on this cache.
ConfigurationException
- Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |