@Test @Ignore("Disabled due to https: public void preconfiguredCacheWithEternal() { CacheManager cacheManager = underTest.get(); log(cacheManager); assertThat(cacheManager, notNullValue()); Cache<Object,Object> cache = cacheManager.getCache("testEternalCache", Object.class, Object.class); log(cache); assertThat(cache, notNullValue()); Object key = "foo"; Object value = "bar"; Object result = cache.getAndPut(key, value); log(result); assertThat(result, nullValue()); result = cache.get(key); log(result); assertThat(result, is(value)); result = cache.get(key); log(result); assertThat(result, is(value)); result = cache.get(key); log(result); assertThat(result, is(value)); }
@Override public synchronized CacheManager get() { checkState(!isStopped(), "Cache-manager destroyed"); if (cacheManager == null) { this.cacheManager = create(configUri); } return cacheManager; }
EhCacheManagerProvider extends LifecycleSupport implements Provider<CacheManager> { @Override public synchronized CacheManager get() { checkState(!isStopped(), "Cache-manager destroyed"); if (cacheManager == null) { this.cacheManager = create(configUri); } return cacheManager; } }
EhCacheManagerProvider extends LifecycleSupport implements Provider<CacheManager> { @Override public synchronized CacheManager get() { checkState(!isStopped(), "Cache-manager destroyed"); if (cacheManager == null) { this.cacheManager = create(configUri); } return cacheManager; } @Inject  EhCacheManagerProvider(final ApplicationDirectories directories); @VisibleForTesting  EhCacheManagerProvider(@Nullable final URI uri); }
EhCacheManagerProvider extends LifecycleSupport implements Provider<CacheManager> { @Override public synchronized CacheManager get() { checkState(!isStopped(), "Cache-manager destroyed"); if (cacheManager == null) { this.cacheManager = create(configUri); } return cacheManager; } @Inject  EhCacheManagerProvider(final ApplicationDirectories directories); @VisibleForTesting  EhCacheManagerProvider(@Nullable final URI uri); @Override synchronized CacheManager get(); }
EhCacheManagerProvider extends LifecycleSupport implements Provider<CacheManager> { @Override public synchronized CacheManager get() { checkState(!isStopped(), "Cache-manager destroyed"); if (cacheManager == null) { this.cacheManager = create(configUri); } return cacheManager; } @Inject  EhCacheManagerProvider(final ApplicationDirectories directories); @VisibleForTesting  EhCacheManagerProvider(@Nullable final URI uri); @Override synchronized CacheManager get();  }