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

com.paypal.core.cache.MemoryCache Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.paypal.core.cache;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class MemoryCache implements Cache {

    private Map store = new ConcurrentHashMap<>();

    @Override
    public T get(String key) {
        return store.get(key);
    }

    @Override
    public void put(String key, T value) {
        store.put(key, value);
    }

    @Override
    public boolean contains(String key) {
        return store.containsKey(key);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy