com.easyjf.cache
Class CacheManager

java.lang.Object
  extended bycom.easyjf.cache.CacheManager

public final class CacheManager
extends java.lang.Object

Cache管理类,负责管理所有的Cache,负责与调用Cache的应用程序接口

Author:
蔡世友

Constructor Summary
CacheManager()
           
CacheManager(Config configuration)
           
CacheManager(java.lang.String configurationFileName)
           
 
Method Summary
 void addCache(ICache cache)
           
 void addCache(java.lang.String cacheName)
           
 boolean cacheExists(java.lang.String cacheName)
           
static CacheManager create()
           
static CacheManager create(java.lang.String configurationFileName)
           
 ICache getCache(java.lang.String name)
           
 java.lang.String[] getCacheNames()
           
 ICache getDefaultCache()
           
static CacheManager getInstance()
           
 int getStatus()
           
 void removeCache(java.lang.String cacheName)
           
 void setDefaultCache(ICache defaultCache)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManager

public CacheManager(Config configuration)
             throws CacheException

CacheManager

public CacheManager(java.lang.String configurationFileName)
             throws CacheException

CacheManager

public CacheManager()
             throws CacheException
Method Detail

create

public static CacheManager create()
                           throws CacheException
Throws:
CacheException

getInstance

public static CacheManager getInstance()

create

public static CacheManager create(java.lang.String configurationFileName)
                           throws CacheException
Throws:
CacheException

getCache

public ICache getCache(java.lang.String name)
                throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

addCache

public void addCache(java.lang.String cacheName)
              throws java.lang.IllegalStateException,
                     CacheException
Throws:
java.lang.IllegalStateException
CacheException

addCache

public void addCache(ICache cache)
              throws java.lang.IllegalStateException,
                     CacheException
Throws:
java.lang.IllegalStateException
CacheException

cacheExists

public boolean cacheExists(java.lang.String cacheName)
                    throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

removeCache

public void removeCache(java.lang.String cacheName)
                 throws java.lang.IllegalStateException,
                        CacheException
Throws:
java.lang.IllegalStateException
CacheException

shutdown

public void shutdown()
              throws CacheException
Throws:
CacheException

getCacheNames

public java.lang.String[] getCacheNames()
                                 throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getStatus

public int getStatus()

getDefaultCache

public ICache getDefaultCache()

setDefaultCache

public void setDefaultCache(ICache defaultCache)