Code example for ConcurrentMap

Methods: get, put

0
		return instance;
	} 
 
	public ConcurrentMap<?, ?> getCache(String name) {
 
		ConcurrentMap<?, ?> cache = caches.get(name);
 
		if (cache == null) {
			cache = new ConcurrentHashMap<>();
			this.putCache(name, cache);
		} 
 
		return cache;
	} 
 
	public ConcurrentMap<?, ?> putCache(String name, ConcurrentMap<?, ?> cache) {
		return caches.put(name, cache);
	} 
 
	public void removeCache(String name) {
		caches.remove(name);
	}