com.litongjava.tio.utils.cache.CacheNameService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tio-utils Show documentation
Show all versions of tio-utils Show documentation
t-io is a aio framework for java
package com.litongjava.tio.utils.cache;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class CacheNameService {
private Map map = new ConcurrentHashMap<>();
public Collection cacheNames() {
return map.values();
}
public void add(CacheName cache) {
map.put(cache.getName(), cache);
}
public CacheName get(String name) {
return map.get(name);
}
public CacheName remove(String name) {
return map.remove(name);
}
}