All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.tio.utils.cache.CacheNameService Maven / Gradle / Ivy

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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy