/** * Puts an item into the cache. * * @param cacheElement * @throws IOException */ @Override public void update( ICacheElement<K, V> cacheElement ) throws IOException { updateWithEventLogging( cacheElement ); }
/** * Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie. * * @throws IOException */ @Override public void dispose() throws IOException { disposeWithEventLogging(); }
/** * Tries to get the event logger. * <p> * @param props * @return ICacheEventLogger */ protected ICacheEventLogger configureCacheEventLogger( Properties props ) { ICacheEventLogger cacheEventLogger = AuxiliaryCacheConfigurator .parseCacheEventLogger( props, IRemoteHttpCacheConstants.HTTP_CACHE_SERVER_PREFIX ); return cacheEventLogger; }
/** * Verify that we don't get an error. */ public void testParseCacheEventLogger_NullName() { // SETUP Properties props = new Properties(); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator.parseCacheEventLogger( props, null ); // VERIFY assertNull( "Should not have a logger.", result ); }
/** * Verify that we can parse the ElementSerializer. */ public void testParseElementSerializer_Null() { // SETUP Properties props = new Properties(); // DO WORK IElementSerializer result = AuxiliaryCacheConfigurator .parseElementSerializer( props, "junk" ); // VERIFY assertTrue( "Should have the default Serializer.", result instanceof StandardSerializer ); } }
/** * Removes all from the region. Wraps the removeAll in event logs. * * @throws IOException */ @Override public void removeAll() throws IOException { removeAllWithEventLogging(); }
/** * 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 */ @Override public boolean remove( K key ) throws IOException { return removeWithEventLogging( key ); }
/** * Gets the item from the cache. * <p> * @param key * @return ICacheElement, a wrapper around the key, value, and attributes * @throws IOException */ @Override public ICacheElement<K, V> get( K key ) throws IOException { return getWithEventLogging( key ); }
/** * 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 */ @Override public Map<K, ICacheElement<K, V>> getMultiple(Set<K> keys) throws IOException { return getMultipleWithEventLogging( keys ); }
/** * Verify that we don't get an error. */ public void testParseCacheEventLogger_Null() { // SETUP Properties props = new Properties(); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator.parseCacheEventLogger( props, "junk" ); // VERIFY assertNull( "Should not have a logger.", result ); }
/** * Tries to get the event logger. * <p> * @param props * @return ICacheEventLogger */ protected static ICacheEventLogger configureCacheEventLogger( Properties props ) { ICacheEventLogger cacheEventLogger = AuxiliaryCacheConfigurator .parseCacheEventLogger( props, IRemoteHttpCacheConstants.HTTP_CACHE_SERVER_PREFIX ); return cacheEventLogger; }
/** * Removes all from the region. Wraps the removeAll in event logs. * <p> * @throws IOException */ @Override public void removeAll() throws IOException { removeAllWithEventLogging(); }
/** * Puts an item into the cache. * <p> * @param cacheElement * @throws IOException */ @Override public void update( ICacheElement<K, V> cacheElement ) throws IOException { updateWithEventLogging( cacheElement ); }
/** * Synchronously dispose the remote cache; if failed, replace the remote handle with a zombie. * <p> * @throws IOException */ @Override public void dispose() throws IOException { disposeWithEventLogging(); }
/** * 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 */ @Override public boolean remove( K key ) throws IOException { return removeWithEventLogging( key ); }
/** * Gets the item from the cache. * * @param key * @return ICacheElement, a wrapper around the key, value, and attributes * @throws IOException */ @Override public ICacheElement<K, V> get( K key ) throws IOException { return getWithEventLogging( key ); }
/** * 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 */ @Override public Map<K, ICacheElement<K, V>> getMultiple(Set<K> keys) throws IOException { return getMultipleWithEventLogging( keys ); }
/** * Verify that we don't get an error. */ public void testParseCacheEventLogger_Null() { // SETUP Properties props = new Properties(); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator.parseCacheEventLogger( props, "junk" ); // VERIFY assertNull( "Should not have a logger.", result ); }
/** * Remove all objects from the persistent store. * <p> * Before the event logging layer, the subclasses implemented the do* methods. Now the do* * methods call the *EventLogging method on the super. The *WithEventLogging methods call the * abstract process* methods. The children implement the process methods. * <p> * @throws IOException */ protected final void doRemoveAll() throws IOException { super.removeAllWithEventLogging(); }
/** * Verify that we don't get an error. */ public void testParseCacheEventLogger_NullName() { // SETUP Properties props = new Properties(); // DO WORK MockCacheEventLogger result = (MockCacheEventLogger) AuxiliaryCacheConfigurator.parseCacheEventLogger( props, null ); // VERIFY assertNull( "Should not have a logger.", result ); }