Class GrantIdCache
java.lang.Object
org.eclipse.pass.loader.nihms.client.cache.GrantIdCache
Caches awardNumber and grantId combination for easy lookup
- Author:
- Karen Hanson
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Empty mapRetrieve grantId by awardNumberstatic GrantIdCacheGet singleton instance of GrantIdCachevoidAdd awardNumber/grantId combination to mapvoidRemove a Grant from cacheintsize()Get number of cached grants
-
Method Details
-
getInstance
Get singleton instance of GrantIdCache- Returns:
- the grant id cache
-
put
Add awardNumber/grantId combination to map- Parameters:
awardNumber- the award numbergrantId- the grant id
-
get
Retrieve grantId by awardNumber- Parameters:
awardNumber- the award number- Returns:
- the grant id
-
remove
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
-