public class CacheService extends Object
DIRECTORY_CACHESERVICE_XML is present in
the "workdirectory" of the DirectoryService then that file will be used for configuring
the CacheManager, if not a default cache configuration file bundled along with
this class is used| Constructor and Description |
|---|
CacheService()
Creates a new instance of CacheService.
|
CacheService(net.sf.ehcache.CacheManager cachemanager)
Creates a new instance of CacheService with the given cache manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Clear the cache and shutdown it
|
net.sf.ehcache.Cache |
getCache(String name)
Get a specific cache from its name, or create a new one
|
void |
initialize(InstanceLayout layout)
Initialize the CacheService
|
void |
initialize(InstanceLayout layout,
String instanceId)
Initialize the CacheService
|
void |
remove(String name)
Remove a cache if it exists.
|
public CacheService()
public CacheService(net.sf.ehcache.CacheManager cachemanager)
cachemanager - The provided CaxcheManager instancepublic void initialize(InstanceLayout layout)
layout - The place on disk where the cache configuration will be storedpublic void initialize(InstanceLayout layout, String instanceId)
layout - The place on disk where the cache configuration will be storedinstanceId - The Instance identifierpublic void destroy()
public net.sf.ehcache.Cache getCache(String name)
name - The Cache name we want to retreivepublic void remove(String name)
name - The Cache's name we want to removeCopyright © 2021. All rights reserved.