Class GrantIdCache

java.lang.Object
org.eclipse.pass.loader.nihms.client.cache.GrantIdCache

public class GrantIdCache extends Object
Caches awardNumber and grantId combination for easy lookup
Author:
Karen Hanson
  • Method Details

    • getInstance

      public static GrantIdCache getInstance()
      Get singleton instance of GrantIdCache
      Returns:
      the grant id cache
    • put

      public void put(String awardNumber, String grantId)
      Add awardNumber/grantId combination to map
      Parameters:
      awardNumber - the award number
      grantId - the grant id
    • get

      public String get(String awardNumber)
      Retrieve grantId by awardNumber
      Parameters:
      awardNumber - the award number
      Returns:
      the grant id
    • remove

      public void remove(String awardNumber)
      Remove a Grant from cache
      Parameters:
      awardNumber - the award number
    • size

      public int size()
      Get number of cached grants
      Returns:
      number of cached grants
    • clear

      public void clear()
      Empty map