/** * Puts an item into the cache. Wrapped in logging. * * @param cacheElement * @throws IOException */ protected final void updateWithEventLogging( ICacheElement<K, V> cacheElement ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( cacheElement, ICacheEventLogger.UPDATE_EVENT ); try { processUpdate( cacheElement ); } finally { logICacheEvent( cacheEvent ); } }
/** * Puts an item into the cache. Wrapped in logging. * <p> * @param cacheElement * @throws IOException */ protected final void updateWithEventLogging( ICacheElement<K, V> cacheElement ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( cacheElement, ICacheEventLogger.UPDATE_EVENT ); try { processUpdate( cacheElement ); } finally { logICacheEvent( cacheEvent ); } }
/** * Removes all from the region. Wraps the removeAll in event logs. * <p> * @throws IOException */ protected final void removeAllWithEventLogging() throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT ); try { processRemoveAll(); } finally { logICacheEvent( cacheEvent ); } }
/** * Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie. * Wraps the removeAll in event logs. * * @throws IOException */ protected final void disposeWithEventLogging() throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT ); try { processDispose(); } finally { logICacheEvent( cacheEvent ); } }
/** * Removes all from the region. Wraps the removeAll in event logs. * * @throws IOException */ protected final void removeAllWithEventLogging() throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "all", ICacheEventLogger.REMOVEALL_EVENT ); try { processRemoveAll(); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets mmatching items from the cache based on the given pattern. * <p> * @param pattern * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no * data matching the pattern. * @throws IOException */ protected final Map<K, ICacheElement<K, V>> getMatchingWithEventLogging( String pattern ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), pattern, ICacheEventLogger.GETMATCHING_EVENT ); try { return processGetMatching( pattern ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets the item from the cache. Wrapped in logging. * * @param key * @return ICacheElement, a wrapper around the key, value, and attributes * @throws IOException */ protected final ICacheElement<K, V> getWithEventLogging( K key ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.GET_EVENT ); try { return processGet( key ); } finally { logICacheEvent( cacheEvent ); } }
/** * Removes the item from the cache. Wraps the remove in event logs. * <p> * @param key * @return boolean, whether or not the item was removed * @throws IOException */ protected final boolean removeWithEventLogging( K key ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.REMOVE_EVENT ); try { return processRemove( key ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets multiple items from the cache based on the given set of keys. * * @param keys * @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 */ protected final Map<K, ICacheElement<K, V>> getMultipleWithEventLogging(Set<K> keys ) throws IOException { ICacheEvent<Serializable> cacheEvent = createICacheEvent( getCacheName(), (Serializable) keys, ICacheEventLogger.GETMULTIPLE_EVENT ); try { return processGetMultiple( keys ); } finally { logICacheEvent( cacheEvent ); } }
/** * Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie. * Wraps the removeAll in event logs. * <p> * @throws IOException */ protected final void disposeWithEventLogging() throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), "none", ICacheEventLogger.DISPOSE_EVENT ); try { processDispose(); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets mmatching items from the cache based on the given pattern. * * @param pattern * @return a map of K key to ICacheElement<K, V> element, or an empty map if there is no * data matching the pattern. * @throws IOException */ protected final Map<K, ICacheElement<K, V>> getMatchingWithEventLogging( String pattern ) throws IOException { ICacheEvent<String> cacheEvent = createICacheEvent( getCacheName(), pattern, ICacheEventLogger.GETMATCHING_EVENT ); try { return processGetMatching( pattern ); } finally { logICacheEvent( cacheEvent ); } }
/** * Removes the item from the cache. Wraps the remove in event logs. * * @param key * @return boolean, whether or not the item was removed * @throws IOException */ protected final boolean removeWithEventLogging( K key ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.REMOVE_EVENT ); try { return processRemove( key ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets the item from the cache. Wrapped in logging. * <p> * @param key * @return ICacheElement, a wrapper around the key, value, and attributes * @throws IOException */ protected final ICacheElement<K, V> getWithEventLogging( K key ) throws IOException { ICacheEvent<K> cacheEvent = createICacheEvent( getCacheName(), key, ICacheEventLogger.GET_EVENT ); try { return processGet( key ); } finally { logICacheEvent( cacheEvent ); } }
/** * Gets multiple items from the cache based on the given set of keys. * <p> * @param keys * @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 */ protected final Map<K, ICacheElement<K, V>> getMultipleWithEventLogging(Set<K> keys ) throws IOException { ICacheEvent<Serializable> cacheEvent = createICacheEvent( getCacheName(), (Serializable) keys, ICacheEventLogger.GETMULTIPLE_EVENT ); try { return processGetMultiple( keys ); } finally { logICacheEvent( cacheEvent ); } }