use of org.cache2k.CacheManager in project cache2k by cache2k.
the class CacheNameTest method managerNameInToString.
@Test
public void managerNameInToString() {
final String _MANAGER_NAME = "managerNameInToString123";
CacheManager cm = CacheManager.getInstance(_MANAGER_NAME);
Cache c = Cache2kBuilder.forUnknownTypes().manager(cm).build();
assertThat(c.toString(), containsString(_MANAGER_NAME));
cm.close();
}
use of org.cache2k.CacheManager in project cache2k by cache2k.
the class Cache2kCoreProviderImpl method close.
@Override
public void close(ClassLoader cl, String managerName) {
if (cl == null) {
cl = getDefaultClassLoader();
}
CacheManager cm;
Map<String, CacheManager> map = loader2name2manager.get(cl);
if (map == null) {
return;
}
cm = map.get(managerName);
if (cm == null) {
return;
}
cm.close();
}
Aggregations