Class NihmsDepositIdCache

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

public class NihmsDepositIdCache extends Object
Caches submission and depositId combination for easy lookup Note: cache only contains deposits for nihms
Author:
Karen Hanson
  • Method Details

    • getInstance

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

      public void put(String submissionId, String depositId)
      Add deposit to map
      Parameters:
      submissionId - the submission id
      depositId - the deposit id
    • get

      public String get(String submissionId)
      Retrieve depositId by submissionId
      Parameters:
      submissionId - the submission id
      Returns:
      the URI from the deposit cache
    • remove

      public void remove(String submissionId)
      Remove a Deposit from cache
      Parameters:
      submissionId - the submission id
    • size

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

      public void clear()
      Empty map