org.jwarp.service.cache
Interface ICacheService
- All Superinterfaces:
- IConfigurable, IExceptionProvider, IService
- All Known Implementing Classes:
- CacheService
- public interface ICacheService
- extends IService
Abstract interface for the default cache service.
|
Field Summary |
static java.lang.String |
SERVICE_TYPE
The service type constant |
| Methods inherited from interface org.jwarp.service.IService |
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend |
SERVICE_TYPE
public static final java.lang.String SERVICE_TYPE
- The service type constant
getCacheNames
public java.util.Iterator getCacheNames(ITicket user)
- Get an iterator with the names of all currently running cache instances.
- Returns:
- The names of the current caches
getCache
public ICache getCache(java.lang.String cacheID,
ITicket user)
throws java.lang.SecurityException,
NotFoundException
- Returns the caches internal implementatino. On the internal implementation further
settings can be changes such as the interval date, the cache's size etc.
- Parameters:
cacheID - The cache's nameuser - The user- Throws:
SecurityEception - If access was denied for/during the operationNotFoundException - If a cache with the given cacheID could not be located.
removeCache
public ICache removeCache(java.lang.String cacheID,
ITicket user)
throws java.lang.SecurityException
- Updates the cache. This is typically called by a thread running independently.
- Parameters:
cacheID - The cache's nameuser - The user- Throws:
SecurityEception - If access was denied for/during the operationNotFoundException - If a cache with the given cacheID could not be located.
createCache
public ICache createCache(java.lang.String cacheID,
ITicket user)
throws java.lang.SecurityException,
InitializationException
- Creates a new cache.
- Parameters:
cacheID - The new cache's nameuser - The user- Throws:
SecurityEception - If access was denied for/during the operationInitializationException - If a cache initialization error occurred or a cache with
the same name is existing yet.
createCache
public ICache createCache(java.lang.String cacheID,
int maxComponents,
int maxTime,
int minAccess,
int updateInterval,
ITicket user)
throws java.lang.SecurityException,
InitializationException
- Creates a new cache.
- Parameters:
cacheID - The new cache's namemaxComponents - The maximum number of components until a cache update is triggeredmaxTime - The maximum time an item is stored within the cacheminAccess - The minimun number of accesses during an update period so an object can stay within the cacheupdateInterval - The update interval of the cache in secondsuser - The user- Throws:
SecurityEception - If access was denied for/during the operationInitializationException - If a cache initialization error occurred or a cache with
the same name is existing yet.