/** * Frees the specified remote cache. * <p> * @param cacheName * @param requesterId * @throws IOException */ public void dispose( String cacheName, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId, ICacheEventLogger.DISPOSE_EVENT ); try { processDispose( cacheName, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Frees the specified remote cache. * <p> * @param cacheName * @param requesterId * @throws IOException */ public void dispose( String cacheName, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "none", requesterId, ICacheEventLogger.DISPOSE_EVENT ); try { processDispose( cacheName, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * The internal processing is wrapped in event logging calls. * <p> * @param item * @param requesterId * @throws IOException */ @Override public void update( ICacheElement<K, V> item, long requesterId ) throws IOException { ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, ICacheEventLogger.UPDATE_EVENT ); try { processUpdate( item, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * The internal processing is wrapped in event logging calls. * <p> * @param item * @param requesterId * @throws IOException */ @Override public void update( ICacheElement<K, V> item, long requesterId ) throws IOException { ICacheEvent<ICacheElement<K, V>> cacheEvent = createICacheEvent( item, requesterId, ICacheEventLogger.UPDATE_EVENT ); try { processUpdate( item, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Remove all keys from the specified remote cache. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param requesterId * @throws IOException */ @Override public void removeAll( String cacheName, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, ICacheEventLogger.REMOVEALL_EVENT ); try { processRemoveAll( cacheName, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Retrieves all matching keys. * <p> * @param cacheName * @param pattern * @param requesterId * @return Map of keys and wrapped objects * @throws IOException */ @Override public Map<K, ICacheElement<K, V>> getMatching( String cacheName, String pattern, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern, requesterId, ICacheEventLogger.GETMATCHING_EVENT ); try { return processGetMatching( cacheName, pattern, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Remove all keys from the specified remote cache. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param requesterId * @throws IOException */ @Override public void removeAll( String cacheName, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, "all", requesterId, ICacheEventLogger.REMOVEALL_EVENT ); try { processRemoveAll( cacheName, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Retrieves all matching keys. * <p> * @param cacheName * @param pattern * @param requesterId * @return Map of keys and wrapped objects * @throws IOException */ @Override public Map<K, ICacheElement<K, V>> getMatching( String cacheName, String pattern, long requesterId ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( cacheName, pattern, requesterId, ICacheEventLogger.GETMATCHING_EVENT ); try { return processGetMatching( cacheName, pattern, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Remove the key from the cache region and don't tell the source listener about it. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param key * @param requesterId * @throws IOException */ @Override public void remove( String cacheName, K key, long requesterId ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.REMOVE_EVENT ); try { processRemove( cacheName, key, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Remove the key from the cache region and don't tell the source listener about it. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param key * @param requesterId * @throws IOException */ @Override public void remove( String cacheName, K key, long requesterId ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.REMOVE_EVENT ); try { processRemove( cacheName, key, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets multiple items from the cache based on the given set of keys. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param keys * @param requesterId * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no * data in cache for any of these keys * @throws IOException */ @Override public Map<K, ICacheElement<K, V>> getMultiple( String cacheName, Set<K> keys, long requesterId ) throws IOException { ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName, (Serializable) keys, requesterId, ICacheEventLogger.GETMULTIPLE_EVENT ); try { return processGetMultiple( cacheName, keys, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets multiple items from the cache based on the given set of keys. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param keys * @param requesterId * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no * data in cache for any of these keys * @throws IOException */ @Override public Map<K, ICacheElement<K, V>> getMultiple( String cacheName, Set<K> keys, long requesterId ) throws IOException { ICacheEvent<Serializable> cacheEvent = createICacheEvent( cacheName, (Serializable) keys, requesterId, ICacheEventLogger.GETMULTIPLE_EVENT ); try { return processGetMultiple( cacheName, keys, requesterId ); } finally { logICacheEvent( cacheEvent ); } }
/** * Returns a cache bean from the specified cache; or null if the key does not exist. * <p> * Adding the requestor id, allows the cache to determine the source of the get. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param key * @param requesterId * @return ICacheElement * @throws IOException */ @Override public ICacheElement<K, V> get( String cacheName, K key, long requesterId ) throws IOException { ICacheElement<K, V> element = null; ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.GET_EVENT ); try { element = processGet( cacheName, key, requesterId ); } finally { logICacheEvent( cacheEvent ); } return element; }
/** * Returns a cache bean from the specified cache; or null if the key does not exist. * <p> * Adding the requestor id, allows the cache to determine the source of the get. * <p> * The internal processing is wrapped in event logging calls. * <p> * @param cacheName * @param key * @param requesterId * @return ICacheElement * @throws IOException */ @Override public ICacheElement<K, V> get( String cacheName, K key, long requesterId ) throws IOException { ICacheElement<K, V> element = null; ICacheEvent<K> cacheEvent = createICacheEvent( cacheName, key, requesterId, ICacheEventLogger.GET_EVENT ); try { element = processGet( cacheName, key, requesterId ); } finally { logICacheEvent( cacheEvent ); } return element; }