com.scooterframework.cache
Class AbstractCacheProvider

java.lang.Object
  extended by com.scooterframework.admin.Plugin
      extended by com.scooterframework.cache.AbstractCacheProvider
All Implemented Interfaces:
CacheProvider

public abstract class AbstractCacheProvider
extends Plugin
implements CacheProvider

AbstractCacheProvider class provides common methods of a cache provider.

Please notice that not all getXXXProperty() would return a value. Whether a property is set depends on settings in the environment.properties file.


Field Summary
 
Fields inherited from class com.scooterframework.admin.Plugin
KEY_PLUGIN_CLASS_NAME, KEY_PLUGIN_NAME
 
Fields inherited from interface com.scooterframework.cache.CacheProvider
KEY_CACHE_PROVIDER_CONFIGFILE, KEY_CACHE_PROVIDER_EXPIRESINSECONDS, KEY_CACHE_PROVIDER_NAMESPACE, KEY_CACHE_PROVIDER_REQUESTTIMEOUTINSECONDS, KEY_CACHE_PROVIDER_URLS
 
Constructor Summary
protected AbstractCacheProvider(java.util.Properties p)
           
 
Method Summary
 int getExpiresInSecondsProperty()
          Returns the expiresInSeconds property
 java.lang.String getName()
          Returns the plugin name
 java.lang.String getNamespaceProperty()
          Returns the namespace property
 java.lang.String getProviderClassName()
          Returns the providerClassName
 int getRequestTimeoutInSecondsProperty()
          Returns the requestTimeoutInSeconds property
 java.util.Map<java.lang.String,java.util.Properties> getStatistics()
          Returns statistics of all caches.
 java.util.Properties getStatistics(java.lang.String name)
          Returns statistics of a cache.
 java.lang.String getUrlsProperty()
          Returns the urls property
 
Methods inherited from class com.scooterframework.admin.Plugin
getPluginClassName, getProperties, getProperty, getProperty, getVersion, isAlive, onStart, onStop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.scooterframework.cache.CacheProvider
getCache, getCacheNames, getProperties, getProperty
 

Constructor Detail

AbstractCacheProvider

protected AbstractCacheProvider(java.util.Properties p)
Method Detail

getProviderClassName

public java.lang.String getProviderClassName()
Returns the providerClassName

Specified by:
getProviderClassName in interface CacheProvider

getNamespaceProperty

public java.lang.String getNamespaceProperty()
Returns the namespace property

Specified by:
getNamespaceProperty in interface CacheProvider

getUrlsProperty

public java.lang.String getUrlsProperty()
Returns the urls property

Specified by:
getUrlsProperty in interface CacheProvider

getExpiresInSecondsProperty

public int getExpiresInSecondsProperty()
Returns the expiresInSeconds property

Specified by:
getExpiresInSecondsProperty in interface CacheProvider

getRequestTimeoutInSecondsProperty

public int getRequestTimeoutInSecondsProperty()
Returns the requestTimeoutInSeconds property

Specified by:
getRequestTimeoutInSecondsProperty in interface CacheProvider

getName

public java.lang.String getName()
Description copied from class: Plugin
Returns the plugin name

Specified by:
getName in interface CacheProvider
Overrides:
getName in class Plugin

getStatistics

public java.util.Properties getStatistics(java.lang.String name)
Returns statistics of a cache.

Specified by:
getStatistics in interface CacheProvider

getStatistics

public java.util.Map<java.lang.String,java.util.Properties> getStatistics()
Returns statistics of all caches.

Specified by:
getStatistics in interface CacheProvider