Class NihmsRepositoryCopyIdCache
java.lang.Object
org.eclipse.pass.loader.nihms.client.cache.NihmsRepositoryCopyIdCache
Caches publicationId and repositoryCopyId mapping for easy lookup
Important: includes RepositoryCopies for NIHMS records only
- Author:
- Karen Hanson
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Empty mapRetrieve RepositoryCopyId by publicationIdstatic NihmsRepositoryCopyIdCacheGet singleton instance of NihmsRepositoryCopyIdCachevoidAdd publicationId to repositoryCopyId mappingvoidRemove a publicationId to repositoryCopyId mapping from cacheintsize()Get number of cached mappings
-
Method Details
-
getInstance
Get singleton instance of NihmsRepositoryCopyIdCache- Returns:
- the RepositoryCopy ID cache
-
put
Add publicationId to repositoryCopyId mapping- Parameters:
publicationId- the publication idrepositoryCopyId- the repository copy it
-
get
Retrieve RepositoryCopyId by publicationId- Parameters:
publicationId- the publication id- Returns:
- the repository copy id
-
remove
Remove a publicationId to repositoryCopyId mapping from cache- Parameters:
publicationId- the publication id
-
size
public int size()Get number of cached mappings- Returns:
- the cache size
-
clear
public void clear()Empty map
-