org.duracloud.client.impl
Class CachingContentStoreManagerImpl

java.lang.Object
  extended by org.duracloud.client.ContentStoreManagerImpl
      extended by org.duracloud.client.impl.CachingContentStoreManagerImpl
All Implemented Interfaces:
ContentStoreManager, org.duracloud.common.model.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
CachingContentStoreManagerImpl(String host, String port, String context)
           
 
Method Summary
 Map<String,ContentStore> getContentStores()
          getContentStores
 ContentStore getPrimaryContentStore()
          getPrimaryContentStore
protected  ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct)
           
protected  void setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper)
           
 
Methods inherited from class org.duracloud.client.ContentStoreManagerImpl
getBaseURL, getContentStore, getPrimaryContentStoreAsAnonymous, getRestHelper, login, logout, reinitialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingContentStoreManagerImpl

public CachingContentStoreManagerImpl(String host,
                                      String port,
                                      String context)
Method Detail

getContentStores

public Map<String,ContentStore> getContentStores()
                                          throws ContentStoreException
Description copied from class: ContentStoreManagerImpl

getContentStores

Specified by:
getContentStores in interface ContentStoreManager
Overrides:
getContentStores in class ContentStoreManagerImpl
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: ContentStoreManagerImpl

getPrimaryContentStore

Specified by:
getPrimaryContentStore in interface ContentStoreManager
Overrides:
getPrimaryContentStore in class ContentStoreManagerImpl
Returns:
the primary ContentStore
Throws:
ContentStoreException

newContentStoreImpl

protected ContentStore newContentStoreImpl(org.duracloud.storage.domain.StorageAccount acct)
Overrides:
newContentStoreImpl in class ContentStoreManagerImpl

setRestHelper

protected void setRestHelper(org.duracloud.common.web.RestHttpHelper restHelper)
Overrides:
setRestHelper in class ContentStoreManagerImpl


Copyright © 2009-2012 DuraSpace. All Rights Reserved.