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

jp.co.yahoo.adssearchapi.v12.oauth2.Cache Maven / Gradle / Ivy

There is a newer version: 8.1.1-spring5
Show newest version
// DO NOT EDIT THIS FILE, THIS FILE IS AUTO GENERATED!
package jp.co.yahoo.adssearchapi.v12.oauth2;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class Cache {

  private static final Cache instance = new Cache();

  private final ConcurrentMap cacheMap;

  private Cache() {
    this.cacheMap = new ConcurrentHashMap<>();
  }

  // Singleton
  public static Cache getInstance() {
    return instance;
  }

  public OAuth2AccessTokenResponse get(String key) {
    return this.cacheMap.get(key);
  }

  public void put(String key, OAuth2AccessTokenResponse value) {
    this.cacheMap.put(key, value);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy