@Test public void testSetUnlimitedMaxEntriesInCache() throws Exception { CacheConfigChangeBridge bridge = new CacheConfigChangeBridge("foo", backend, notifier, cacheConfiguration); toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TOTAL_COUNT_FIELD_NAME, -1); bridge.connectConfigs(); assertThat(cacheConfiguration.getMaxEntriesInCache(), is(0L)); }
public void connectConfigs() { initializeFromCluster(); cacheConfiguration.addConfigurationListener(this); notifier.addNotificationListener(this); }
CacheConfigChangeBridge implements CacheConfigurationListener, ToolkitNotificationListener { public void connectConfigs() { initializeFromCluster(); cacheConfiguration.addConfigurationListener(this); notifier.addNotificationListener(this); } }
CacheConfigChangeBridge implements CacheConfigurationListener, ToolkitNotificationListener { public void connectConfigs() { initializeFromCluster(); cacheConfiguration.addConfigurationListener(this); notifier.addNotificationListener(this); } CacheConfigChangeBridge(String fullyQualifiedEhcacheName, ToolkitCacheInternal backend,
                                 ToolkitNotifier<CacheConfigChangeNotificationMsg> notifier,
                                 CacheConfiguration cacheConfiguration); }
CacheConfigChangeBridge implements CacheConfigurationListener, ToolkitNotificationListener { public void connectConfigs() { initializeFromCluster(); cacheConfiguration.addConfigurationListener(this); notifier.addNotificationListener(this); } CacheConfigChangeBridge(String fullyQualifiedEhcacheName, ToolkitCacheInternal backend,
                                 ToolkitNotifier<CacheConfigChangeNotificationMsg> notifier,
                                 CacheConfiguration cacheConfiguration); void connectConfigs(); void disconnectConfigs(); @Override void timeToIdleChanged(long oldTimeToIdle, long newTimeToIdle); @Override void timeToLiveChanged(long oldTimeToLive, long newTimeToLive); @Override void diskCapacityChanged(int oldCapacity, int newCapacity); @Override void maxEntriesInCacheChanged(long oldCapacity, long newCapacity); @Override void memoryCapacityChanged(int oldCapacity, int newCapacity); @Override void maxBytesLocalHeapChanged(long oldValue, long newValue); @Override void maxBytesLocalDiskChanged(long oldValue, long newValue); @Override void loggingChanged(boolean oldValue, boolean newValue); @Override void registered(CacheConfiguration config); @Override void deregistered(CacheConfiguration config); @Override void onNotification(ToolkitNotificationEvent event); static int mapMaxEntriesInCacheToTotalCount(int maxEntriesInCache); }
CacheConfigChangeBridge implements CacheConfigurationListener, ToolkitNotificationListener { public void connectConfigs() { initializeFromCluster(); cacheConfiguration.addConfigurationListener(this); notifier.addNotificationListener(this); } CacheConfigChangeBridge(String fullyQualifiedEhcacheName, ToolkitCacheInternal backend,
                                 ToolkitNotifier<CacheConfigChangeNotificationMsg> notifier,
                                 CacheConfiguration cacheConfiguration); void connectConfigs(); void disconnectConfigs(); @Override void timeToIdleChanged(long oldTimeToIdle, long newTimeToIdle); @Override void timeToLiveChanged(long oldTimeToLive, long newTimeToLive); @Override void diskCapacityChanged(int oldCapacity, int newCapacity); @Override void maxEntriesInCacheChanged(long oldCapacity, long newCapacity); @Override void memoryCapacityChanged(int oldCapacity, int newCapacity); @Override void maxBytesLocalHeapChanged(long oldValue, long newValue); @Override void maxBytesLocalDiskChanged(long oldValue, long newValue); @Override void loggingChanged(boolean oldValue, boolean newValue); @Override void registered(CacheConfiguration config); @Override void deregistered(CacheConfiguration config); @Override void onNotification(ToolkitNotificationEvent event); static int mapMaxEntriesInCacheToTotalCount(int maxEntriesInCache);  }