Package org.duracloud.client.impl
Class CachingContentStoreManagerImpl
- java.lang.Object
-
- org.duracloud.client.ContentStoreManagerImpl
-
- org.duracloud.client.impl.CachingContentStoreManagerImpl
-
- All Implemented Interfaces:
ContentStoreManager,Securable
public class CachingContentStoreManagerImpl extends ContentStoreManagerImpl
This class retains the results of the initial call to both: getContentStores() & getPrimaryContentStore() and returns these cached values on subsequent calls.- Author:
- Andrew Woods Date: Nov 30, 2010
-
-
Constructor Summary
Constructors Constructor Description CachingContentStoreManagerImpl(String host, String port, String context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,ContentStore>getContentStores()Gets all available content stores.ContentStoregetPrimaryContentStore()Gets the primary content store.protected ContentStorenewContentStoreImpl(StorageAccount acct)protected voidsetRestHelper(RestHttpHelper restHelper)-
Methods inherited from class org.duracloud.client.ContentStoreManagerImpl
getBaseURL, getContentStore, getContentStore, getContentStores, getPrimaryContentStore, getPrimaryContentStoreAsAnonymous, getPrimaryContentStoreAsAnonymous, getRestHelper, isWritable, login, logout, newContentStoreImpl, reinitialize
-
-
-
-
Method Detail
-
getContentStores
public Map<String,ContentStore> getContentStores() throws ContentStoreException
Description copied from class:ContentStoreManagerImplGets all available content stores. Each content store uses the default number of retries (3) on call failure.- Specified by:
getContentStoresin interfaceContentStoreManager- Overrides:
getContentStoresin classContentStoreManagerImpl- Returns:
- a map of content stores to content store IDs
- Throws:
ContentStoreException- if the content store list cannot be retrieved
-
getPrimaryContentStore
public ContentStore getPrimaryContentStore() throws ContentStoreException
Description copied from class:ContentStoreManagerImplGets the primary content store. Content store uses the default number of retries (3) on call failure.- Specified by:
getPrimaryContentStorein interfaceContentStoreManager- Overrides:
getPrimaryContentStorein classContentStoreManagerImpl- Returns:
- the primary ContentStore
- Throws:
ContentStoreException
-
newContentStoreImpl
protected ContentStore newContentStoreImpl(StorageAccount acct)
- Overrides:
newContentStoreImplin classContentStoreManagerImpl
-
setRestHelper
protected void setRestHelper(RestHttpHelper restHelper)
- Overrides:
setRestHelperin classContentStoreManagerImpl
-
-