/** * Gets the cacheManager attribute of the LateralCacheTCPListener object. * <p> * Normally this is set by the factory. If it wasn't set the listener defaults to the expected * singleton behavior of the cache manager. * <p> * @param name * @return CompositeCache */ protected CompositeCache<K, V> getCache( String name ) { if ( getCacheManager() == null ) { // revert to singleton on failure try { setCacheManager( CompositeCacheManager.getInstance() ); } catch (CacheException e) { throw new RuntimeException("Could not retrieve cache manager instance", e); } if ( log.isDebugEnabled() ) { log.debug( "cacheMgr = " + getCacheManager() ); } } return getCacheManager().getCache( name ); }
/** * Gets the cacheManager attribute of the LateralCacheTCPListener object. * <p> * Normally this is set by the factory. If it wasn't set the listener defaults to the expected * singleton behavior of the cache manager. * <p> * @param name * @return CompositeCache */ protected CompositeCache<K, V> getCache( String name ) { if ( getCacheManager() == null ) { // revert to singleton on failure try { setCacheManager( CompositeCacheManager.getInstance() ); } catch (CacheException e) { throw new RuntimeException("Could not retrieve cache manager instance", e); } if ( log.isDebugEnabled() ) { log.debug( "cacheMgr = " + getCacheManager() ); } } return getCacheManager().getCache( name ); }