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

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

There is a newer version: 3.7.3.v202400213-RELEASE
Show newest version
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