/** Adds a removeAll request to the lateral cache. */ @Override public void removeAll() { try { eventQueue.addRemoveAllEvent(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** Adds a removeAll request to the lateral cache. */ @Override public void removeAll() { try { eventQueue.addRemoveAllEvent(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** Adds a dispose request to the remote cache. */ @Override public void dispose() { try { cacheEventQueue.addDisposeEvent(); } catch ( IOException e ) { log.error( "Problem adding DisposeEvent to queue.", e ); cacheEventQueue.destroy(); } }
/** Adds a dispose request to the remote cache. */ @Override public void dispose() { try { cacheEventQueue.addDisposeEvent(); } catch ( IOException e ) { log.error( "Problem adding DisposeEvent to queue.", e ); cacheEventQueue.destroy(); } }
/** Adds a dispose request to the lateral cache. */ @Override public void dispose() { try { eventQueue.addDisposeEvent(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** Adds a dispose request to the lateral cache. */ @Override public void dispose() { try { eventQueue.addDisposeEvent(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** * @param ce * @throws IOException */ @Override public void update( ICacheElement<K, V> ce ) throws IOException { putCount++; try { eventQueue.addPutEvent( ce ); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** * Return the keys in this cache. * <p> * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getKeySet() */ @Override public Set<K> getKeySet() throws IOException { try { return cache.getKeySet(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } return Collections.emptySet(); }
/** * Adds a removeAll request to the remote cache. * <p> * @throws IOException */ @Override public void removeAll() throws IOException { try { cacheEventQueue.addRemoveAllEvent(); } catch ( IOException e ) { log.error( "Problem adding RemoveAllEvent to queue.", e ); cacheEventQueue.destroy(); throw e; } }
/** * Return the keys in this cache. * <p> * @see org.apache.commons.jcs.auxiliary.AuxiliaryCache#getKeySet() */ @Override public Set<K> getKeySet() throws IOException { try { return cache.getKeySet(); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } return Collections.emptySet(); }
/** * @param ce * @throws IOException */ @Override public void update( ICacheElement<K, V> ce ) throws IOException { putCount++; try { eventQueue.addPutEvent( ce ); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } }
/** * Adds a removeAll request to the remote cache. * <p> * @throws IOException */ @Override public void removeAll() throws IOException { try { cacheEventQueue.addRemoveAllEvent(); } catch ( IOException e ) { log.error( "Problem adding RemoveAllEvent to queue.", e ); cacheEventQueue.destroy(); throw e; } }
/** * Adds a remove request to the lateral cache. * <p> * @param key * @return always false */ @Override public boolean remove( K key ) { removeCount++; try { eventQueue.addRemoveEvent( key ); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } return false; }
/** * Adds a remove request to the lateral cache. * <p> * @param key * @return always false */ @Override public boolean remove( K key ) { removeCount++; try { eventQueue.addRemoveEvent( key ); } catch ( IOException ex ) { log.error( ex ); eventQueue.destroy(); } return false; }
/** * Adds a put event to the queue. * <p> * @param element * @throws IOException */ @Override public void update( ICacheElement<K, V> element ) throws IOException { putCount++; try { cacheEventQueue.addPutEvent( element ); } catch ( IOException e ) { log.error( "Problem adding putEvent to queue.", e ); cacheEventQueue.destroy(); throw e; } }
/** * Constructs with the given remote cache, and fires up an event queue for asynchronous * processing. * <p> * @param cache */ public RemoteCacheNoWait( IRemoteCacheClient<K, V> cache ) { remoteCacheClient = cache; this.cacheEventQueue = createCacheEventQueue(cache); if ( remoteCacheClient.getStatus() == CacheStatus.ERROR ) { cacheEventQueue.destroy(); } }
/** * Resets the event q by first destroying the existing one and starting up new one. * <p> * There may be no good reason to kill the existing queue. We will sometimes need to set a new * listener id, so we should create a new queue. We should let the old queue drain. If we were * Connected to the failover, it would be best to finish sending items. */ public void resetEventQ() { ICacheEventQueue<K, V> previousQueue = cacheEventQueue; this.cacheEventQueue = createCacheEventQueue(this.remoteCacheClient); if ( previousQueue.isWorking() ) { // we don't expect anything, it would have all gone to the zombie if ( log.isInfoEnabled() ) { log.info( "resetEventQ, previous queue has [" + previousQueue.size() + "] items queued up." ); } previousQueue.destroy(); } }
/** * Resets the event q by first destroying the existing one and starting up new one. */ public void resetEventQ() { if ( eventQueue.isWorking() ) { eventQueue.destroy(); } CacheEventQueueFactory<K, V> fact = new CacheEventQueueFactory<K, V>(); this.eventQueue = fact.createCacheEventQueue( new CacheAdaptor<K, V>( cache ), CacheInfo.listenerId, cache .getCacheName(), cache.getAuxiliaryCacheAttributes().getEventQueuePoolName(), cache .getAuxiliaryCacheAttributes().getEventQueueType() ); }
/** * Resets the event q by first destroying the existing one and starting up new one. */ public void resetEventQ() { if ( eventQueue.isWorking() ) { eventQueue.destroy(); } CacheEventQueueFactory<K, V> fact = new CacheEventQueueFactory<K, V>(); this.eventQueue = fact.createCacheEventQueue( new CacheAdaptor<K, V>( cache ), CacheInfo.listenerId, cache .getCacheName(), cache.getAuxiliaryCacheAttributes().getEventQueuePoolName(), cache .getAuxiliaryCacheAttributes().getEventQueueType() ); }
/** * Constructs with the given remote cache, and fires up an event queue for asynchronous * processing. * <p> * @param cache */ public RemoteCacheNoWait( IRemoteCacheClient<K, V> cache ) { remoteCacheClient = cache; CacheEventQueueFactory<K, V> factory = new CacheEventQueueFactory<K, V>(); this.cacheEventQueue = factory.createCacheEventQueue( new CacheAdaptor<K, V>( remoteCacheClient ), remoteCacheClient .getListenerId(), remoteCacheClient.getCacheName(), remoteCacheClient.getAuxiliaryCacheAttributes() .getEventQueuePoolName(), remoteCacheClient.getAuxiliaryCacheAttributes().getEventQueueType() ); if ( remoteCacheClient.getStatus() == CacheStatus.ERROR ) { cacheEventQueue.destroy(); } }