com.alachisoft.jvcache.web.caching
Class Cache<K,V>

java.lang.Object
  extended by com.alachisoft.jvcache.web.caching.Cache<K,V>
Type Parameters:
K -
V -
All Implemented Interfaces:
java.util.Enumeration

public class Cache<K,V>
extends java.lang.Object
implements java.util.Enumeration

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.
 
Constructor Summary
Cache(com.alachisoft.jvcache.web.caching.CacheImplBase objectCache, java.lang.String cacheId)
          Creates a new instance of Cache.
Cache(com.alachisoft.jvcache.web.caching.CacheImplBase objectCache, java.lang.String cacheId, com.alachisoft.jvcache.statistics.PerfStatsCollector perfStatsCollector)
          Creates a new instance of Cache.
 
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, 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.
 boolean addDependency(java.lang.String key, CacheDependency dep, boolean isResyncRequired)
          Add dependency 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()
           
 void clearClientCacheAsync(AsyncCacheClearedCallback onAsyncCacheClearCallback)
           
 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)
          Retrieves the specified item from the Cache object.
 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, 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()
          Gets client Cache status, true if enabled
 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.
 boolean hasMoreElements()
           
 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 isPerfStatsCollectorInitialized()
           
 boolean lock(java.lang.String key, TimeSpan lockTimeout, LockHandle lockHandle)
          * Acquire a lock on an item in cache.
 java.lang.Object nextElement()
           
 void raiseCustomEvent(java.lang.Object key, java.lang.Object value)
          Raises a custom event.
 void registerCacheEventlistener(CacheListener listener, java.util.EnumSet<CacheNotificationType> registerAgainst)
          Register the cache stopped event with the server.
 void registerCacheStatusEventlistener(ClusterListener listener, java.util.EnumSet<CacheStatusNotificationType> registerAgainst)
           
 void registerCQ(ContinuousQuery query)
          Registers the notifications based on the specified ContinuousQuery.
 void registerCustomEventListener(CustomListener listener)
          Adds the specified custom listener to receive custom cache events from this cache.
 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.
 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 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.
 boolean setAttributes(java.lang.String key, CacheItemAttributes attributes)
          Add Attribute existing cache item
 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, LockHandle lockHandle)
          Unlocks a locked cached item if the correct lock-id is specified.
 void unregisterCacheEventlistener(CacheListener listener, java.util.EnumSet<CacheNotificationType> unregisterAgainst)
           
 void unregisterCacheStatusEventlistener(ClusterListener listener, java.util.EnumSet<CacheStatusNotificationType> unregisterAgainst)
           
 void unRegisterCQ(ContinuousQuery query)
          Unregisters notifications for the specified ContinuousQuery.
 void unregisterCustomEventListener(CustomListener listener)
           
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NoAbsoluteExpiration

public static java.util.Date NoAbsoluteExpiration
specify no absulute expiration.


NoSlidingExpiration

public static TimeSpan NoSlidingExpiration
specify no siliding expiration.


NoLockingExpiration

public static final TimeSpan NoLockingExpiration
Disable lock expiration

Constructor Detail

Cache

public Cache(com.alachisoft.jvcache.web.caching.CacheImplBase objectCache,
             java.lang.String cacheId)
Creates a new instance of Cache.

Parameters:
server - Name of the server to connect. This will override configuration. if the client is already connected an Exception is thrown.
port - the port of the server.
cacheId - The cache-id to request from the server.
Throws:
com.alachisoft.ncache.exceptions.ConfigurationException - Thrown when an exception occurs during configuration. Likely causes are badly specified configuration strings.
com.alachisoft.ncache.exceptions.GeneralFailureException - Thrown when an exception occurs during a clustered operation.

Cache

public Cache(com.alachisoft.jvcache.web.caching.CacheImplBase objectCache,
             java.lang.String cacheId,
             com.alachisoft.jvcache.statistics.PerfStatsCollector perfStatsCollector)
Creates a new instance of Cache.

Parameters:
objectCache -
cacheId -
perfStatsCollector -
Method Detail

isPerfStatsCollectorInitialized

public boolean isPerfStatsCollectorInitialized()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isExceptionsEnabled

public boolean isExceptionsEnabled()
If this property is set the Cache object throws exceptions from public operations. If not set no exception is thrown and the operation fails silently. Setting this flag is especially helpful during development phase of application since exceptions provide more information about the specific causes of failure.

Returns:
true if exceptions are enabled, otherwise false.

setExceptionsEnabled

public void setExceptionsEnabled(boolean exceptionsEnabled)
If this property is set the Cache object throws exceptions from public operations. If not set no exception is thrown and the operation fails silently. Setting this flag is especially helpful during development phase of application since exceptions provide more information about the specific causes of failure.

Parameters:
exceptionsEnabled - boolean value to enable/disable the exceptions.

add

public CacheItemVersion add(java.lang.String key,
                            java.lang.Object value)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Adds an item into the Cache object with a cache key to reference its location.

Parameters:
key - The cache key used to reference the item.
value - The item to be added to the cache.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

add

public CacheItemVersion add(java.lang.String key,
                            CacheItem item)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Add a CacheItem to the cache

Parameters:
key - The cache key used to reference the item.
item - CacheItem to add in the cache
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

add

public CacheItemVersion add(java.lang.String key,
                            java.lang.Object value,
                            Tag[] tags)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Adds an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. It also enables the associating tags with the object.

Parameters:
key - The cache key used to reference the item.
value - Value to add in the cache
tags - An array of Tags to associate with the object.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
Tag

add

public CacheItemVersion add(java.lang.String key,
                            java.lang.Object value,
                            NamedTagsDictionary namedTags)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Adds an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. It also enables the associating tags with the object.

Parameters:
key - The cache key used to reference the item.
value - Value to add in the cache
namedTags - to associate with object.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
NamedTagsDictionary

add

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,
                            ConnectionException,
                            java.lang.Exception
Adds an item in the cache.

Parameters:
key - The cache key used to reference the item.
group - The data group of the item
subGroup - The data group of the item
value - The value to be added in the cache.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

add

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,
                            ConnectionException,
                            java.lang.Exception
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.

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

add

public CacheItemVersion add(java.lang.String key,
                            CacheItem item,
                            DSWriteOption dsWriteOption,
                            DataSourceItemsAddedCallback onDataSourceItemAdded)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Adds the specified item to the Cache, and a delegate you can use to notify your application when the item is added into cache.

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

add

public CacheItemVersion add(java.lang.String key,
                            CacheItem item,
                            DSWriteOption dsWriteOption,
                            java.lang.String providerName,
                            DataSourceItemsAddedCallback onDataSourceItemAdded)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ArgumentException,
                            ConnectionException,
                            java.lang.Exception
Adds the specified item to the Cache, and a delegate you can use to notify your application when the item is added into cache.

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

addBulk

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,
                                 ConnectionException,
                                 java.lang.Exception
Add array of CacheItem to the cache.

Parameters:
keys - The cache keys used to reference the items.
items - The items that are to be stored
dsWriteOption - 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.
Returns:
keys that are added or that already exists in the cache and their status.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

addBulk

public java.util.HashMap addBulk(java.lang.String[] keys,
                                 CacheItem[] items,
                                 DSWriteOption dsWriteOption,
                                 DataSourceItemsAddedCallback onDataSourceItemAddedCallback)
                          throws GeneralFailureException,
                                 OperationFailedException,
                                 AggregateException,
                                 SecurityException,
                                 ConfigurationException,
                                 ArgumentException,
                                 ConnectionException,
                                 java.lang.Exception
Add array of CacheItem to the cache.

Parameters:
keys - The cache keys used to reference the items.
items - The items that are to be stored
dsWriteOption - option regarding updating data source.
onDataSourceItemAddedCallback - callback, if provided, is called when item is added to data source.
Returns:
keys that are added or that already exists in the cache and their status.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

addAsync

public java.lang.Object addAsync(java.lang.String key,
                                 CacheItem item,
                                 DSWriteOption dsWriteOption,
                                 DataSourceItemsAddedCallback onSourceItemAdded)
                          throws GeneralFailureException,
                                 OperationFailedException,
                                 AggregateException,
                                 SecurityException,
                                 ConfigurationException,
                                 ArgumentException,
                                 ConnectionException,
                                 java.lang.Exception
Adds a key and CacheItem in the cache Asynchronously.

Parameters:
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.
Returns:
Success or Failure
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

addAsync

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,
                                 ConnectionException,
                                 java.lang.Exception
Adds a key and CacheItem in the cache Asynchronously.

Parameters:
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.
Returns:
Success or Failure
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

addAsync

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,
                                 ConnectionException,
                                 java.lang.Exception
Add a key value pair to the cache asynchronously.

Parameters:
key - The cache key used to reference the item.
value - The value to be added.
onAsyncItemAddCallback - Callback that returns the result of the operation
group - The data group of the item
subGroup - The data group of the item
Returns:
Success of Failure
Throws:
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 file
ConnectionException
java.lang.Exception

insert

public CacheItemVersion insert(java.lang.String key,
                               java.lang.Object value)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Inserts an item into the Cache object with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration.

Parameters:
key - The cache key used to reference the item.
value - the item to be added.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

insert

public CacheItemVersion insert(java.lang.String key,
                               CacheItem item)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Add a CacheItem to the cache

Parameters:
key - The cache key used to reference the item.
item - The item to be added to the cache.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

insert

public CacheItemVersion insert(java.lang.String key,
                               CacheItem item,
                               DSWriteOption dsWriteOption,
                               DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Add a CacheItem to the cache

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

insert

public CacheItemVersion insert(java.lang.String key,
                               CacheItem item,
                               DSWriteOption dsWriteOption,
                               java.lang.String providerName,
                               DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Add a CacheItem to the cache

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

insert

public CacheItemVersion insert(java.lang.String key,
                               CacheItem item,
                               LockHandle lockHandle,
                               boolean releaseLock)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

insert

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,
                               ConnectionException,
                               java.lang.Exception
Inserts an Object into the Cache.

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

insert

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,
                               ConnectionException,
                               java.lang.Exception
Inserts an object into the Cache with dependencies and expiration policies.

Parameters:
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 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 -
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception

insert

public CacheItemVersion insert(java.lang.String key,
                               java.lang.Object value,
                               Tag[] tags)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Inserts an item into the Cache with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. It also enables the associating tags with the object.

Parameters:
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.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
Tag

insert

public CacheItemVersion insert(java.lang.String key,
                               java.lang.Object value,
                               NamedTagsDictionary namedTags)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ArgumentException,
                               ConnectionException,
                               java.lang.Exception
Inserts an item into the Cache with a cache key to reference its location and using default values provided by the CacheItemPriority enumeration. It also enables the associating tags with the object.

Parameters:
key - The cache key used to reference the item.
value - The item to be added to the cache.
namedTags - to associate with object.
Returns:
The item version in cache
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
NamedTagsDictionary

insertAsync

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,
                        ConnectionException,
                        java.lang.Exception
Insert a CacheItem to the cache asynchoronously

Parameters:
key - The cache key used to reference the item.
value - The value to be added in teh cache.
asyncItemUpdatedCallback -
group -
subGroup -
Throws:
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.
ConnectionException
java.lang.Exception

insertAsync

public void insertAsync(java.lang.String key,
                        CacheItem item,
                        DSWriteOption dsWriteOption,
                        DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
                 throws GeneralFailureException,
                        OperationFailedException,
                        AggregateException,
                        SecurityException,
                        ConfigurationException,
                        ArgumentException,
                        ConnectionException,
                        java.lang.Exception
Inserts a key and CacheItem in the cache.

Parameters:
key - The cache key used to reference the item.
item - The item that is to be stored
dsWriteOption - option regarding updating data source.
onDataSourceItemUpdated - callback; if provided, is called when item is updated in data source.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

insertAsync

public void insertAsync(java.lang.String key,
                        CacheItem item,
                        java.lang.String providerName,
                        DSWriteOption dsWriteOption,
                        DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
                 throws GeneralFailureException,
                        OperationFailedException,
                        AggregateException,
                        SecurityException,
                        ConfigurationException,
                        ArgumentException,
                        ConnectionException,
                        java.lang.Exception
Inserts a key and CacheItem in the cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
GeneralFailureException Thrown when an exception occurs during a clustered operation.

insertBulk

public java.util.HashMap insertBulk(java.lang.String[] keys,
                                    CacheItem[] items,
                                    DSWriteOption dsWriteOption,
                                    DataSourceItemsUpdatedCallback onDataSourceItemUpdated)
                             throws GeneralFailureException,
                                    OperationFailedException,
                                    AggregateException,
                                    SecurityException,
                                    ConfigurationException,
                                    ArgumentException,
                                    ConnectionException,
                                    java.lang.Exception
Insert list of CacheItem to the cache

Parameters:
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.
Returns:
The list of items could not be added in the cache.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
GeneralFailureException Thrown when an exception occurs during a clustered operation.

insertBulk

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,
                                    ConnectionException,
                                    java.lang.Exception
Insert list of CacheItem to the cache

Parameters:
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.
Returns:
The list of items could not be added in the cache.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
GeneralFailureException Thrown when an exception occurs during a clustered operation.

remove

public java.lang.Object remove(java.lang.String key)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ConnectionException,
                               java.lang.Exception
Removes the object from the Cache.

Parameters:
key - The cache key used to reference the item.
Returns:
The item removed from the Cache. If the value in the key parameter is not found, returns a null reference.
Throws:
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.
ConnectionException
java.lang.Exception

delete

public void delete(java.lang.String key)
            throws GeneralFailureException,
                   OperationFailedException,
                   AggregateException,
                   SecurityException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Removes the object from the Cache.

Parameters:
key - The cache key used to reference the item. GeneralFailureException Thrown when an exception occurs during a clustered operation.
Throws:
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.
ConnectionException
java.lang.Exception

remove

public java.lang.Object remove(java.lang.String key,
                               CacheItemVersion version)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ConnectionException,
                               java.lang.Exception
Removes an item from cache if the specified version is still the most recent version in the cache.

Parameters:
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.
Returns:
The item removed from the Cache. If the value in the key parameter is not found, returns a null reference GeneralFailureException Thrown when an exception occurs during a clustered operation.
Throws:
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.
ConnectionException
java.lang.Exception

delete

public void delete(java.lang.String key,
                   CacheItemVersion version)
            throws GeneralFailureException,
                   OperationFailedException,
                   AggregateException,
                   SecurityException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Removes an item from cache if the specified version is still the most recent version in the cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

remove

public java.lang.Object remove(java.lang.String key,
                               LockHandle lockHandle)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ConnectionException,
                               java.lang.Exception
Removes an item from cache if it is not already locked or if the correct lock-id is specified.

Parameters:
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.
Returns:
The item removed from the Cache. If the value in the key parameter is not found, returns a null reference GeneralFailureException Thrown when an exception occurs during a clustered operation.
Throws:
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.
ConnectionException
java.lang.Exception

delete

public void delete(java.lang.String key,
                   LockHandle lockHandle)
            throws GeneralFailureException,
                   OperationFailedException,
                   AggregateException,
                   SecurityException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Removes an item from cache if it is not already locked or if the correct lock-id is specified.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

remove

public java.lang.Object remove(java.lang.String key,
                               DSWriteOption dsWriteOption,
                               java.lang.String providerName,
                               DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ConnectionException,
                               java.lang.Exception
Removes the object from the Cache.

Parameters:
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.
Returns:
The item removed from the Cache. If the value in the key parameter is not found, returns a null reference.
Throws:
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.
ConnectionException
java.lang.Exception

delete

public void delete(java.lang.String key,
                   DSWriteOption dsWriteOption,
                   java.lang.String providerName,
                   DataSourceItemsRemovedCallback onDataSourceItemRemoved)
            throws GeneralFailureException,
                   OperationFailedException,
                   AggregateException,
                   SecurityException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Removes the object from the Cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

delete

public void delete(java.lang.String key,
                   DSWriteOption dsWriteOption,
                   DataSourceItemsRemovedCallback onDataSourceItemRemoved)
            throws GeneralFailureException,
                   OperationFailedException,
                   AggregateException,
                   SecurityException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Removes the object from the Cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

remove

public java.lang.Object remove(java.lang.String key,
                               DSWriteOption dsWriteOption,
                               DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                        throws GeneralFailureException,
                               OperationFailedException,
                               AggregateException,
                               SecurityException,
                               ConfigurationException,
                               ConnectionException,
                               java.lang.Exception
Removes the object from the Cache.

Parameters:
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.
Returns:
The item removed from the Cache. If the value in the key parameter is not found, returns a null reference.
Throws:
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.
ConnectionException
java.lang.Exception

removeAsync

public void removeAsync(java.lang.String key,
                        AsyncItemRemovedCallback asyncItemRemovedCallback,
                        DSWriteOption dsWriteOption,
                        DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                 throws GeneralFailureException,
                        OperationFailedException,
                        AggregateException,
                        SecurityException,
                        ConfigurationException,
                        ConnectionException,
                        java.lang.Exception
Removes the object from the Cache. This is similar to Remove except that the operation is performed asynchronously. A ItemRemoved event is fired upon successful completion of this method.It is not possible to determine if the actual operation has failed, therefore use this operation for the cases when it does not matter much.

Parameters:
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 operation
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.
Throws:
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.
ConnectionException
java.lang.Exception

removeAsync

public void removeAsync(java.lang.String key,
                        AsyncItemRemovedCallback asyncItemRemovedCallback,
                        DSWriteOption dsWriteOption,
                        java.lang.String providerName,
                        DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                 throws GeneralFailureException,
                        OperationFailedException,
                        AggregateException,
                        SecurityException,
                        ConfigurationException,
                        ConnectionException,
                        java.lang.Exception
Removes the object from the Cache. This is similar to Remove except that the operation is performed asynchronously. A ItemRemoved event is fired upon successful completion of this method.It is not possible to determine if the actual operation has failed, therefore use this operation for the cases when it does not matter much.

Parameters:
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 operation
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.
Throws:
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.
ConnectionException
java.lang.Exception

removeBulk

public java.util.HashMap removeBulk(java.lang.String[] keys,
                                    DSWriteOption dsWriteOption,
                                    DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                             throws GeneralFailureException,
                                    OperationFailedException,
                                    AggregateException,
                                    SecurityException,
                                    ConfigurationException,
                                    ConnectionException,
                                    java.lang.Exception
Removes the objects from the Cache.

Parameters:
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.
Returns:
The items removed from the Cache. If the value in the keys parameter is not found, returns a null reference
Throws:
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.
ConnectionException
java.lang.Exception

deleteBulk

public void deleteBulk(java.lang.String[] keys,
                       DSWriteOption dsWriteOption,
                       DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                throws GeneralFailureException,
                       OperationFailedException,
                       AggregateException,
                       SecurityException,
                       ConfigurationException,
                       ConnectionException,
                       java.lang.Exception
Removes the objects from the Cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

removeBulk

public java.util.HashMap removeBulk(java.lang.String[] keys,
                                    DSWriteOption dsWriteOption,
                                    java.lang.String providerName,
                                    DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                             throws GeneralFailureException,
                                    OperationFailedException,
                                    AggregateException,
                                    SecurityException,
                                    ConfigurationException,
                                    ConnectionException,
                                    java.lang.Exception
Removes the objects from the Cache.

Parameters:
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.
Returns:
The items removed from the Cache. If the value in the keys parameter is not found, returns a null reference
Throws:
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.
ConnectionException
java.lang.Exception

deleteBulk

public void deleteBulk(java.lang.String[] keys,
                       DSWriteOption dsWriteOption,
                       java.lang.String providerName,
                       DataSourceItemsRemovedCallback onDataSourceItemRemoved)
                throws GeneralFailureException,
                       OperationFailedException,
                       AggregateException,
                       SecurityException,
                       ConfigurationException,
                       ConnectionException,
                       java.lang.Exception
Removes the objects from the Cache.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception

removeGroupData

public void removeGroupData(java.lang.String group,
                            java.lang.String subGroup)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Remove the group from cache.

Parameters:
group - group to be removed.
subGroup - subGroup to be removed.
Throws:
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.
ConnectionException
java.lang.Exception

clearClientCache

public void clearClientCache()
                      throws GeneralFailureException,
                             OperationFailedException,
                             AggregateException,
                             SecurityException,
                             ConfigurationException,
                             ConnectionException,
                             java.lang.Exception
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
java.lang.Exception

clear

public void clear()
           throws GeneralFailureException,
                  OperationFailedException,
                  AggregateException,
                  SecurityException,
                  ConfigurationException,
                  ConnectionException,
                  java.lang.Exception
Removes all elements from the Cache.

Throws:
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.
ConnectionException
java.lang.Exception

clear

public void clear(DSWriteOption dsWriteOption,
                  DataSourceClearedCallback onDataSourceCleared)
           throws GeneralFailureException,
                  OperationFailedException,
                  AggregateException,
                  SecurityException,
                  ConfigurationException,
                  ConnectionException,
                  java.lang.Exception
Removes all elements from the Cache.

Parameters:
dsWriteOption - option regarding updating data source.
onDataSourceCleared - callback; if provided, is called when data source is cleared.
Throws:
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.
ConnectionException
java.lang.Exception

clearAsync

public void clearAsync(DSWriteOption dsWriteOption,
                       AsyncCacheClearedCallback onAsyncCacheCleared,
                       DataSourceClearedCallback onDataSourceCleared)
                throws GeneralFailureException,
                       OperationFailedException,
                       AggregateException,
                       SecurityException,
                       ConfigurationException,
                       ConnectionException,
                       java.lang.Exception
Removes all elements from the Cache asynchronously.

Parameters:
dsWriteOption - option regarding updating data source.
onAsyncCacheCleared - Callback that returns the result of the operation
onDataSourceCleared - callback; if provided, is called when data source is cleared.
Throws:
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.
ConnectionException
java.lang.Exception

clearClientCacheAsync

public void clearClientCacheAsync(AsyncCacheClearedCallback onAsyncCacheClearCallback)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  ConnectionException,
                                  java.lang.Exception
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
java.lang.Exception

search

public java.util.Collection search(java.lang.String query,
                                   java.util.HashMap values)
                            throws GeneralFailureException,
                                   OperationFailedException,
                                   AggregateException,
                                   SecurityException,
                                   ConfigurationException,
                                   ConnectionException,
                                   java.lang.Exception
Retrieves the keys for the specified query.

Parameters:
query - The query to execute on the cache.
values - The HashMap of attribute names and values.
Returns:
The list of keys.
Throws:
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.
ConnectionException
java.lang.Exception

registerCQ

public void registerCQ(ContinuousQuery query)
                throws GeneralFailureException,
                       OperationFailedException,
                       AggregateException,
                       SecurityException,
                       ConfigurationException,
                       ConnectionException,
                       java.lang.Exception
Registers the notifications based on the specified ContinuousQuery.

Parameters:
query - ContinuousQuery to register notifications for.
Throws:
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.
ConnectionException
java.lang.Exception

searchCQ

public java.util.Collection searchCQ(ContinuousQuery query)
                              throws GeneralFailureException,
                                     OperationFailedException,
                                     AggregateException,
                                     SecurityException,
                                     ConfigurationException,
                                     ConnectionException,
                                     java.lang.Exception
Performs search on the Cache based on the specified ContinuousQuery and registers the notifications.

Parameters:
query - ContinuousQuery to perform the search and register notifications for.
Returns:
The list of keys.
Throws:
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.
ConnectionException
java.lang.Exception

unRegisterCQ

public void unRegisterCQ(ContinuousQuery query)
                  throws GeneralFailureException,
                         OperationFailedException,
                         AggregateException,
                         SecurityException,
                         ConfigurationException,
                         ConnectionException,
                         java.lang.Exception
Unregisters notifications for the specified ContinuousQuery.

Parameters:
query - ContinuousQuery to unregister notifications for.
Throws:
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.
ConnectionException
java.lang.Exception

searchEntriesCQ

public java.util.HashMap searchEntriesCQ(ContinuousQuery query)
                                  throws GeneralFailureException,
                                         OperationFailedException,
                                         AggregateException,
                                         SecurityException,
                                         ConfigurationException,
                                         ConnectionException,
                                         java.lang.Exception
Performs search on the Cache based on the specified ContinuousQuery and registers the notifications.

Parameters:
query - ContinuousQuery to perform the search and register notifications for.
Returns:
The list of key and value pairs for the specified query.
Throws:
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.
ConnectionException
java.lang.Exception

searchEntries

public java.util.HashMap searchEntries(java.lang.String query,
                                       java.util.HashMap values)
                                throws GeneralFailureException,
                                       OperationFailedException,
                                       AggregateException,
                                       SecurityException,
                                       ConfigurationException,
                                       ConnectionException,
                                       java.lang.Exception
Retrieves the key and value pairs for the specified query.

Parameters:
query - The query to execute on the cache.
values - The HashMap of attribute names and values.
Returns:
The list of key and value pairs for the specified query.
Throws:
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.
ConnectionException
java.lang.Exception

contains

public boolean contains(java.lang.String key)
                 throws GeneralFailureException,
                        OperationFailedException,
                        AggregateException,
                        SecurityException,
                        ConfigurationException,
                        ConnectionException,
                        java.lang.Exception
Determines whether the cache contains a specific key.

Parameters:
key - The key to locate in the Cache.
Returns:
true if the Cache contains an element with the specified key; otherwise, false.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheStream

public CacheStream getCacheStream(java.lang.String key,
                                  StreamMode streamMode)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Get Cache Stream based on mode.

Parameters:
key - The identifier for the cache item.
streamMode - Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLock
Returns:
CacheStream object
Throws:
java.lang.Exception - Thrown when an exception occurs while performing operation.
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

getCacheStream

public CacheStream getCacheStream(java.lang.String key,
                                  StreamMode streamMode,
                                  CacheItemPriority priority)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Gets an instance of the CacheStream class.

Parameters:
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
Returns:
CacheStream An instance of CacheStream
Throws:
java.lang.Exception
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

getCacheStream

public CacheStream getCacheStream(java.lang.String key,
                                  StreamMode streamMode,
                                  java.util.Date absoluteExpiration,
                                  TimeSpan slidingExpiration,
                                  CacheItemPriority priority)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Get Cache Stream based on mode.

Parameters:
key - The identifier for the cache item.
streamMode - Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLock
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.
Returns:
CacheStream object
Throws:
java.lang.Exception - Thrown when an exception occurs while performing operation.
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

getCacheStream

public CacheStream getCacheStream(java.lang.String key,
                                  java.lang.String group,
                                  java.lang.String subgroup,
                                  StreamMode streamMode,
                                  CacheItemPriority priority)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Gets an instance of the CacheStream class.

Parameters:
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 ReadWithoutLock
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.
Returns:
CacheStream object
Throws:
java.lang.Exception - Thrown when an exception occurs while performing operation.
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

getCacheStream

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 GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Gets an instance of the CacheStream class.

Parameters:
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 ReadWithoutLock
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.
Returns:
CacheStream object
Throws:
java.lang.Exception - Thrown when an exception occurs while performing operation.
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

getCacheStream

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 GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  ConfigurationException,
                                  StreamAlreadyLockedException,
                                  StreamCloseException,
                                  StreamInvalidLockException,
                                  StreamException,
                                  StreamNotFoundException,
                                  ConnectionException,
                                  java.lang.Exception
* Get Cache Stream based on mode.

Parameters:
key - The identifier for the cache item.
group - The data group of the item
subGroup - The data group of the item
streamMode - Specified the mode in which stream will be opened e.g; Read, Write and ReadWithoutLock
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.
Returns:
CacheStream object
Throws:
java.lang.Exception - Thrown when an exception occurs while performing operation.
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
StreamAlreadyLockedException
StreamCloseException
StreamInvalidLockException
StreamException
StreamNotFoundException
ConnectionException

get

public java.lang.Object get(java.lang.String key)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
Returns:
The retrieved cache item, or a null reference (Nothing in Visual Basic) if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            CacheItemVersion version)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object. It accepts the CacheItemVersion. If item version is 0, object would be retrieved from cache with version. If any value greater the 0 is specified,then object is returned from the cache only if that is the current version of the object in the cache.

Parameters:
key - The identifier for the cache item to retrieve.
version - the version of the object.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            TimeSpan lockTimeout,
                            LockHandle lockHandle,
                            boolean acquireLock)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object if it is not already locked. Otherwise returns null. This is different from the normal Get operation where an item is returned ignoring the lock altogether.

Parameters:
key - The identifier for the cache item to retrieve
lockTimeout - The time span after which the lock is automatically released
lockHandle - 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
Returns:
The retrieved cache item, or a null reference if the key is not found
Throws:
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. }
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            DSReadOption dsReadOption)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            DSReadOption dsReadOption,
                            CacheItemVersion version)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
dsReadOption - Options regarding reading from data source
version - he version of the object.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

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,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
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
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            java.lang.String providerName,
                            DSReadOption dsReadOption)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
providerName - unique identifier for the data source.
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

get

public java.lang.Object get(java.lang.String key,
                            java.lang.String providerName,
                            DSReadOption dsReadOption,
                            CacheItemVersion version)
                     throws GeneralFailureException,
                            OperationFailedException,
                            AggregateException,
                            SecurityException,
                            ConfigurationException,
                            ConnectionException,
                            java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
providerName - unique identifier for the data source.
dsReadOption - Options regarding reading from data source
version - he version of the object.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getBulk

public java.util.HashMap getBulk(java.lang.String[] keys,
                                 DSReadOption dsReadOption)
                          throws GeneralFailureException,
                                 OperationFailedException,
                                 AggregateException,
                                 SecurityException,
                                 ConfigurationException,
                                 ConnectionException,
                                 java.lang.Exception
Retrieves the object from the cache for the given keys as key value pairs

Parameters:
keys - The keys against which items are to be fetched.
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache items.
Throws:
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.
ConnectionException
java.lang.Exception

getBulk

public java.util.HashMap getBulk(java.lang.String[] keys,
                                 java.lang.String provideName,
                                 DSReadOption dsReadOption)
                          throws GeneralFailureException,
                                 OperationFailedException,
                                 AggregateException,
                                 SecurityException,
                                 ConfigurationException,
                                 ConnectionException,
                                 java.lang.Exception
Retrieves the object from the cache for the given keys as key value pairs

Parameters:
keys - The keys against which items are to be fetched.
provideName - unique identifier for the data source.
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache items.
Throws:
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.
ConnectionException
java.lang.Exception

getGroupKeys

public java.util.Collection getGroupKeys(java.lang.String group,
                                         java.lang.String subGroup)
                                  throws GeneralFailureException,
                                         OperationFailedException,
                                         AggregateException,
                                         SecurityException,
                                         ConfigurationException,
                                         ConnectionException,
                                         java.lang.Exception
Retrieves the key and value pairs in a group or sub group. If only group is specified, data for the group and all the sub groups of the group are returned. If both the group and sub group are specified. Only the data related to the sub group are returned.

Parameters:
group - The group whose keys are to be returned.
subGroup - The sub group of the group foe which keys are to be returned.
Returns:
The list of keys of a group or a sub group.
Throws:
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.
ConnectionException
java.lang.Exception

getGroupData

public java.util.HashMap getGroupData(java.lang.String group,
                                      java.lang.String subGroup)
                               throws GeneralFailureException,
                                      OperationFailedException,
                                      AggregateException,
                                      SecurityException,
                                      ConfigurationException,
                                      ConnectionException,
                                      java.lang.Exception
Retrieves the key and value pairs in a group or sub group. If only group is specified, data for the group and all the sub groups of the group are returned. If both the group and sub group are specified. Only the data related to the sub group are returned.

Parameters:
group - The group whose keys are to be returned.
subGroup - The sub group of the group foe which keys are to be returned.
Returns:
The list of key and value pairs of a group or a sub group.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Get the cache item stored in cache.

Parameters:
key - The cache key used to reference the item.
Returns:
The Cache item in the cache against the specified key.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              TimeSpan lockTimeout,
                              LockHandle lockHandle,
                              boolean acquireLock)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Get the cache item stored in cache.

Parameters:
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.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItem

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              CacheItemVersion version)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object. It accepts the by reference. See @link CacheItemVersion by reference If null is passed for CacheItemVersion, then the version of the object from the cache is returned. If non-null CacheItemVersion is passed, then object is returned from the cache only if that is the current version of the object in the cache.

Parameters:
key - The identifier for the cache item to retrieve.
version - The version of the object.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              DSReadOption dsReadOption)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              java.lang.String providerName,
                              DSReadOption dsReadOption)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - The identifier for the cache item to retrieve.
providerName - A specific name for the data source
dsReadOption - Options regarding reading from data source
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              DSReadOption dsReadOption,
                              CacheItemVersion version)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object.

Parameters:
key - key The identifier for the cache item to retrieve.
dsReadOption - Options regarding reading from data source
version -
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              java.lang.String providerName,
                              DSReadOption dsReadOption,
                              CacheItemVersion version)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object. If the object is read through the data source, put it in the cache. It accepts the @link CacheItemVersion by reference. If null is passed for CacheItemVersion, then the version of the object from the cache is returned. If non-null CacheItemVersion is passed, then object is returned from the cache only if that is the current version of the object in the cache.

Parameters:
key - The identifier for the cache item to retrieve.
providerName - A specific name for the data source
dsReadOption - Options regarding reading from data source.
version - The version of the object.
Returns:
The retrieved cache item, or a null reference if the key is not found
Throws:
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.
ConnectionException
java.lang.Exception

getCacheItem

public CacheItem getCacheItem(java.lang.String key,
                              java.lang.String group,
                              java.lang.String subGroup,
                              DSReadOption dsReadOption)
                       throws GeneralFailureException,
                              OperationFailedException,
                              AggregateException,
                              SecurityException,
                              ConfigurationException,
                              ConnectionException,
                              java.lang.Exception
Retrieves the specified item from the Cache object. If the object is read through the data source, put it against the given group and sub group.

Parameters:
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.
Returns:
The retrieved cache item, or a null reference if the key is not found.
Throws:
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.
ConnectionException
java.lang.Exception

getByAllTags

public java.util.HashMap getByAllTags(Tag[] tags)
                               throws GeneralFailureException,
                                      OperationFailedException,
                                      AggregateException,
                                      SecurityException,
                                      java.lang.Exception
Returns the cached objects that have all the same tags in common. (Returns the Intersection set.)

Parameters:
tags - An array of Tag to search with.
Returns:
A HashMap containing cache keys and associated objects.
Throws:
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

getKeysByAllTags

public java.util.Collection getKeysByAllTags(Tag[] tags)
                                      throws GeneralFailureException,
                                             OperationFailedException,
                                             AggregateException,
                                             SecurityException,
                                             java.lang.Exception
Returns the cached objects that have all the same tags in common. (Returns the Intersection set.)

Parameters:
tags - An array of Tag to search with.
Returns:
A Collection containing cache keys.
Throws:
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

getByAnyTag

public java.util.HashMap getByAnyTag(Tag[] tags)
                              throws GeneralFailureException,
                                     OperationFailedException,
                                     AggregateException,
                                     SecurityException,
                                     java.lang.Exception
Returns the cached objects that have any of the same tags in common. (Returns the Union set.)

Parameters:
tags - An array of Tag to search with.
Returns:
A HashMap containing cache keys and associated objects.
Throws:
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.

getKeysByAnyTag

public java.util.Collection getKeysByAnyTag(Tag[] tags)
                                     throws GeneralFailureException,
                                            OperationFailedException,
                                            AggregateException,
                                            SecurityException,
                                            java.lang.Exception
Returns the cached objects that have any of the same tags in common. (Returns the Union set.)

Parameters:
tags - An array of Tag to search with.
Returns:
A Collection containing cache keys.
Throws:
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

getByTag

public java.util.HashMap getByTag(Tag tag)
                           throws GeneralFailureException,
                                  OperationFailedException,
                                  AggregateException,
                                  SecurityException,
                                  java.lang.Exception
Gets all the cached objects with the specified tag.

Parameters:
tag - The tag to search with.
Returns:
A HashMap containing cache keys and associated objects.
Throws:
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.

getKeysByTag

public java.util.Collection getKeysByTag(Tag tag)
                                  throws GeneralFailureException,
                                         OperationFailedException,
                                         AggregateException,
                                         SecurityException,
                                         java.lang.Exception
Gets all the cached objects with the specified tag.

Parameters:
tag - The tag to search with.
Returns:
A Collection containing cache keys.
Throws:
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

removeByTag

public void removeByTag(Tag tag)
                 throws GeneralFailureException,
                        OperationFailedException,
                        ArgumentNullException,
                        AggregateException,
                        SecurityException,
                        ConnectionException,
                        java.lang.Exception
Removes the cached objects that have the specified tag.

Parameters:
tag - - A Tag to search with.
Throws:
GeneralFailureException - Thrown when an exception occurs during a clustered operation.
AggregateException
OperationFailedException - Thrown whenever an API fails.
SecurityException
ArgumentNullException
ConnectionException
java.lang.Exception

removeByAnyTag

public void removeByAnyTag(Tag[] tags)
                    throws GeneralFailureException,
                           OperationFailedException,
                           ArgumentNullException,
                           AggregateException,
                           SecurityException,
                           ConnectionException,
                           java.lang.Exception
Removes the cached objects that have any of the same tags in common. (Returns the Union set.)

Parameters:
tags - - An array of Tag to search with.
Throws:
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.
ConnectionException
java.lang.Exception

removeByAllTags

public void removeByAllTags(Tag[] tags)
                     throws GeneralFailureException,
                            OperationFailedException,
                            ArgumentNullException,
                            AggregateException,
                            SecurityException,
                            ConnectionException,
                            java.lang.Exception
Removes the cached objects that have all of the same tags in common. (Returns the Intersection set.)

Parameters:
tags - - An array of Tag to search with.
Throws:
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.
ConnectionException
java.lang.Exception

getIfNewer

public java.lang.Object getIfNewer(java.lang.String key,
                                   CacheItemVersion version)
                            throws GeneralFailureException,
                                   OperationFailedException,
                                   AggregateException,
                                   SecurityException,
                                   ConfigurationException,
                                   ConnectionException,
                                   java.lang.Exception
* Gets an object from the cache only if a newer version of the object exists in cache.

Parameters:
key - key used to reference the desired object
version - The version of the desired object passed by reference.
Returns:
The version of the desired object passed by reference.
Throws:
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.
ConnectionException
java.lang.Exception

getIfNewer

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,
                                   ConnectionException,
                                   java.lang.Exception
* Gets an object from the cache only if a newer version of the object exists in cache.

Parameters:
key - key used to reference the desired object
group - key used to reference the desired object
subGroup - The group of the cached object
version - The subGroup of the cached object
Returns:
The version of the desired object passed by reference.
Throws:
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.
ConnectionException
java.lang.Exception

lock

public boolean lock(java.lang.String key,
                    TimeSpan lockTimeout,
                    LockHandle lockHandle)
             throws OperationFailedException,
                    SecurityException,
                    GeneralFailureException,
                    AggregateException,
                    ConfigurationException,
                    ConnectionException,
                    java.lang.Exception
* Acquire a lock on an item in cache.

Parameters:
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.
Returns:
True if the lock was acquired successfully, false otherwise
Throws:
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.
ConnectionException
java.lang.Exception

unlock

public void unlock(java.lang.String key)
            throws OperationFailedException,
                   SecurityException,
                   GeneralFailureException,
                   AggregateException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
* Forcefully unlocks a locked cached item.

Parameters:
key - key of a cached item to be unlocked
Throws:
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.
ConnectionException
java.lang.Exception

unlock

public void unlock(java.lang.String key,
                   LockHandle lockHandle)
            throws OperationFailedException,
                   SecurityException,
                   GeneralFailureException,
                   AggregateException,
                   ConfigurationException,
                   ConnectionException,
                   java.lang.Exception
Unlocks a locked cached item if the correct lock-id is specified.

Parameters:
key - key of a cached item to be unlocked
lockId - An instance of LockHandle that was generated when lock was acquired
Throws:
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.
ConnectionException
java.lang.Exception

addDependency

public boolean addDependency(java.lang.String key,
                             CacheDependency dep,
                             boolean isResyncRequired)
                      throws GeneralFailureException,
                             OperationFailedException,
                             AggregateException,
                             SecurityException,
                             ConfigurationException,
                             ConnectionException,
                             java.lang.Exception
Add dependency to the cache item.

Parameters:
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
Returns:
True if the operation was successfull.
Throws:
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.
ConnectionException
java.lang.Exception

setAttributes

public boolean setAttributes(java.lang.String key,
                             CacheItemAttributes attributes)
                      throws OperationFailedException,
                             GeneralFailureException,
                             SecurityException,
                             AggregateException,
                             ConnectionException,
                             java.lang.Exception
Add Attribute existing cache item

Parameters:
key - Key used to reference the required object
attributes - Set of attributes to be added
Returns:
True of the operation succeeds otherwise false
Throws:
OperationFailedException
GeneralFailureException
SecurityException
AggregateException
ConnectionException
java.lang.Exception

registerKeyNotificationCallback

public void registerKeyNotificationCallback(java.lang.String key,
                                            CacheItemUpdatedCallback updateCallback,
                                            CacheItemRemovedCallback removeCallback)
                                     throws GeneralFailureException,
                                            OperationFailedException,
                                            AggregateException,
                                            SecurityException,
                                            ConfigurationException,
                                            ConnectionException,
                                            java.lang.Exception
Registers the CacheItemUpdatedCallback and/or CacheItemRemovedCallback for the specified key. CacheItemUpdatedCallback and/or CacheItemRemovedCallback provided this way are very useful because a client application can show interest in any item already present in the cache. As soon as the item is updated or removed from the cache, the client application is notified and actions can be taken accordingly.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItemUpdatedCallback, CacheItemRemovedCallback

registerKeyNotificationCallback

public void registerKeyNotificationCallback(java.lang.String[] keys,
                                            CacheItemUpdatedCallback updateCallback,
                                            CacheItemRemovedCallback removeCallback)
                                     throws GeneralFailureException,
                                            OperationFailedException,
                                            AggregateException,
                                            SecurityException,
                                            ConfigurationException,
                                            ConnectionException,
                                            java.lang.Exception
Registers the CacheItemUpdatedCallback and/or CacheItemRemovedCallback for the list of specified keys. CacheItemUpdatedCallback and/or CacheItemRemovedCallback provided this way are very useful because a client application can show interest in any item already present in the cache. As soon as the item is updated or removed from the cache, the client application is notified and actions can be taken accordingly.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItemUpdatedCallback, CacheItemRemovedCallback

unRegisterKeyNotificationCallback

public void unRegisterKeyNotificationCallback(java.lang.String key,
                                              CacheItemUpdatedCallback updateCallback,
                                              CacheItemRemovedCallback removeCallback)
                                       throws GeneralFailureException,
                                              OperationFailedException,
                                              AggregateException,
                                              SecurityException,
                                              ConfigurationException,
                                              ConnectionException,
                                              java.lang.Exception
Unregisters the CacheItemUpdatedCallback and/or CacheItemRemovedCallback already registered for the specified key.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItemUpdatedCallback, CacheItemRemovedCallback

unRegisterKeyNotificationCallback

public void unRegisterKeyNotificationCallback(java.lang.String[] keys,
                                              CacheItemUpdatedCallback updateCallback,
                                              CacheItemRemovedCallback removeCallback)
                                       throws GeneralFailureException,
                                              OperationFailedException,
                                              AggregateException,
                                              SecurityException,
                                              ConfigurationException,
                                              ConnectionException,
                                              java.lang.Exception
Unregisters the CacheItemUpdatedCallback and/or CacheItemRemovedCallback already registered for the specified list of keys.

Parameters:
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.
Throws:
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.
ConnectionException
java.lang.Exception
See Also:
CacheItemUpdatedCallback, CacheItemRemovedCallback

raiseCustomEvent

public void raiseCustomEvent(java.lang.Object key,
                             java.lang.Object value)
                      throws GeneralFailureException,
                             OperationFailedException,
                             AggregateException,
                             SecurityException,
                             ConfigurationException,
                             ConnectionException,
                             java.lang.Exception
Raises a custom event.

Parameters:
key - The key of the event.
value - The value.
Throws:
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.
ConnectionException
java.lang.Exception

getCount

public long getCount()
              throws GeneralFailureException,
                     OperationFailedException,
                     AggregateException,
                     SecurityException,
                     ConfigurationException,
                     ConnectionException,
                     java.lang.Exception
Returns the cache count. Note that this count is the total item count in the whole cluster.

Returns:
The count of the cache elements.
Throws:
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.
ConnectionException
java.lang.Exception

dispose

public void dispose()
             throws GeneralFailureException,
                    OperationFailedException,
                    ConfigurationException
Disposes this cache instance.

Throws:
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.

registerCacheEventlistener

public void registerCacheEventlistener(CacheListener listener,
                                       java.util.EnumSet<CacheNotificationType> registerAgainst)
                                throws GeneralFailureException,
                                       OperationFailedException,
                                       AggregateException,
                                       SecurityException,
                                       ConfigurationException,
                                       ArgumentNullException,
                                       ConnectionException
Register the cache stopped event with the server.

Throws:
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.
ArgumentNullException
ConnectionException

unregisterCacheEventlistener

public void unregisterCacheEventlistener(CacheListener listener,
                                         java.util.EnumSet<CacheNotificationType> unregisterAgainst)
                                  throws GeneralFailureException,
                                         OperationFailedException,
                                         AggregateException,
                                         SecurityException,
                                         ConfigurationException,
                                         ConnectionException,
                                         ArgumentException
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
ArgumentException

registerCacheStatusEventlistener

public void registerCacheStatusEventlistener(ClusterListener listener,
                                             java.util.EnumSet<CacheStatusNotificationType> registerAgainst)
                                      throws GeneralFailureException,
                                             OperationFailedException,
                                             AggregateException,
                                             SecurityException,
                                             ConfigurationException,
                                             ConnectionException,
                                             ArgumentNullException
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
ArgumentNullException

unregisterCacheStatusEventlistener

public void unregisterCacheStatusEventlistener(ClusterListener listener,
                                               java.util.EnumSet<CacheStatusNotificationType> unregisterAgainst)
                                        throws GeneralFailureException,
                                               OperationFailedException,
                                               AggregateException,
                                               SecurityException,
                                               ConfigurationException,
                                               ConnectionException,
                                               ArgumentNullException
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
ArgumentNullException

registerCustomEventListener

public void registerCustomEventListener(CustomListener listener)
                                 throws GeneralFailureException,
                                        OperationFailedException,
                                        AggregateException,
                                        SecurityException,
                                        ConfigurationException,
                                        ConnectionException,
                                        java.lang.Exception
Adds the specified custom listener to receive custom cache events from this cache. If CustomListener l is null, no exception is thrown and no action is performed.

Parameters:
l - the CustomListener
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
java.lang.Exception

unregisterCustomEventListener

public void unregisterCustomEventListener(CustomListener listener)
                                   throws GeneralFailureException,
                                          OperationFailedException,
                                          AggregateException,
                                          SecurityException,
                                          ConfigurationException,
                                          ConnectionException,
                                          java.lang.Exception
Throws:
GeneralFailureException
OperationFailedException
AggregateException
SecurityException
ConfigurationException
ConnectionException
java.lang.Exception

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Specified by:
nextElement in interface java.util.Enumeration

getEnumerator

public java.util.Enumeration getEnumerator()
Returns:

getClientCacheStatus

public boolean getClientCacheStatus()
Gets client Cache status, true if enabled

Returns: