Code example for ConcurrentHashMap

0
public class ConcurrentIndexMap implements IndexMap { 
    private final ConcurrentHashMap<BytesKey, OpItem> map; 
 
 
    public ConcurrentIndexMap() { 
        this.map = new ConcurrentHashMap<BytesKey, OpItem>(); 
    } 
 
 
    @Override 
    public boolean containsKey(final BytesKey key) { 
        return this.map.containsKey(key); 
    } 
 
 
    @Override 
    public OpItem get(final BytesKey key) { 
        return this.map.get(key); 
    }