/** * Increments the put count. Gets the cache that was injected by the lateral factory. Calls put * on the cache. * <p> * @see org.apache.commons.jcs.engine.behavior.ICacheListener#handlePut(org.apache.commons.jcs.engine.behavior.ICacheElement) */ @Override public void handlePut( ICacheElement<K, V> element ) throws IOException { putCnt++; if ( log.isInfoEnabled() ) { if ( getPutCnt() % 100 == 0 ) { log.info( "Put Count (port " + getTcpLateralCacheAttributes().getTcpListenerPort() + ") = " + getPutCnt() ); } } if ( log.isDebugEnabled() ) { log.debug( "handlePut> cacheName=" + element.getCacheName() + ", key=" + element.getKey() ); } getCache( element.getCacheName() ).localUpdate( element ); }
getCacheManager().<K, V>getCache( cb.getCacheName() ).localUpdate( cb );
/** * Increments the put count. Gets the cache that was injected by the lateral factory. Calls put * on the cache. * <p> * @see org.apache.commons.jcs.engine.behavior.ICacheListener#handlePut(org.apache.commons.jcs.engine.behavior.ICacheElement) */ @Override public void handlePut( ICacheElement<K, V> element ) throws IOException { putCnt++; if ( log.isInfoEnabled() ) { if ( getPutCnt() % 100 == 0 ) { log.info( "Put Count (port " + getTcpLateralCacheAttributes().getTcpListenerPort() + ") = " + getPutCnt() ); } } if ( log.isDebugEnabled() ) { log.debug( "handlePut> cacheName=" + element.getCacheName() + ", key=" + element.getKey() ); } getCache( element.getCacheName() ).localUpdate( element ); }
+ " requesterId [" + requesterId + "]" ); c.localUpdate( item );
+ " requesterId [" + requesterId + "]" ); c.localUpdate( item );
/** * Processes an update request. * <p> * If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote * origination. * <p> * @param item * @param requesterId * @throws IOException */ @Override public void processUpdate( ICacheElement<K, V> item, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( item.getCacheName() ); boolean keepLocal = !remoteHttpCacheServerAttributes.isLocalClusterConsistency(); if ( keepLocal ) { cache.localUpdate( item ); } else { cache.update( item ); } }
/** * Processes an update request. * <p> * If isLocalClusterConsistency is enabled we will treat this as a normal request of non-remote * origination. * <p> * @param item * @param requesterId * @throws IOException */ @Override public void processUpdate( ICacheElement<K, V> item, long requesterId ) throws IOException { CompositeCache<K, V> cache = getCacheManager().getCache( item.getCacheName() ); boolean keepLocal = !remoteHttpCacheServerAttributes.isLocalClusterConsistency(); if ( keepLocal ) { cache.localUpdate( item ); } else { cache.update( item ); } }