public class CacheService extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DASH |
static String |
PAGE_CACHE |
static String |
STATS_AVG_GET_TIME |
static String |
STATS_AVG_PUT_TIME |
static String |
STATS_AVG_REMOVAL_TIME |
static String |
STATS_GETS |
static String |
STATS_HITS |
static String |
STATS_HITS_PERCENT |
static String |
STATS_MISSES |
static String |
STATS_MISSES_PERCENT |
static String |
STATS_NAME |
static String |
STATS_PUTS |
static String |
STATS_REMOVALS |
static String |
STATS_SIZE |
Constructor and Description |
---|
CacheService() |
Modifier and Type | Method and Description |
---|---|
static void |
clearCache(Site site) |
static void |
clearStatistics(Site site) |
static javax.cache.Cache<String,CachedResponse> |
createCache(Site site)
Returns the
Cache instance for the selected Site . |
static javax.cache.CacheManager |
createCacheManager(com.hazelcast.core.HazelcastInstance instance,
boolean isClient) |
static void |
expireCacheElement(Site site,
String cacheElement) |
static Future<Integer> |
expireCacheElementsByPrefix(javax.cache.Cache<String,CachedResponse> cache,
String cacheElementPrefix)
Expires cache elements by path prefix
|
static Future<Integer> |
expireCacheElementsByPrefix(Site site,
String cacheElementPrefix)
Expires cache elements by path prefix
|
static int |
expireCacheElementsStartingWith(javax.cache.Cache<String,CachedResponse> cache,
String cacheElementPrefix)
Deprecated.
Use
expireCacheElementsByPrefix(Cache, String) instead. |
static int |
expireCacheElementsStartingWith(Site site,
String cacheElementPrefix)
Deprecated.
use
expireCacheElementsByPrefix(Cache, String) instead. |
static javax.cache.Cache<String,CachedResponse> |
getCache(Site site)
Returns the
Cache instance for the selected Site . |
static List<CachedResponse> |
getCacheEntries(Site site) |
static javax.cache.CacheManager |
getCacheManager()
Returns the
CacheManager instance. |
static Map<String,String> |
getCacheStatistics(Site site) |
static void |
shutdown() |
public static final String PAGE_CACHE
public static final String DASH
public static final String STATS_NAME
public static final String STATS_SIZE
public static final String STATS_PUTS
public static final String STATS_GETS
public static final String STATS_REMOVALS
public static final String STATS_HITS
public static final String STATS_HITS_PERCENT
public static final String STATS_MISSES
public static final String STATS_MISSES_PERCENT
public static final String STATS_AVG_PUT_TIME
public static final String STATS_AVG_GET_TIME
public static final String STATS_AVG_REMOVAL_TIME
public static javax.cache.CacheManager createCacheManager(com.hazelcast.core.HazelcastInstance instance, boolean isClient)
public static javax.cache.CacheManager getCacheManager()
CacheManager
instance.CacheManager
instance.public static javax.cache.Cache<String,CachedResponse> getCache(Site site)
Cache
instance for the selected Site
. Use this method to retrieve a cache instance
which already must exists.site
- The Site
to get the cache forCache
instance for the specified site.public static void clearCache(Site site)
public static void clearStatistics(Site site)
public static javax.cache.Cache<String,CachedResponse> createCache(Site site)
Cache
instance for the selected Site
. Use this method to retrieve a new cache
instance. Should be only used in InitializerService
site
- The site.Cache
instance for the specified site.public static void shutdown()
public static List<CachedResponse> getCacheEntries(Site site)
@Deprecated public static int expireCacheElementsStartingWith(Site site, String cacheElementPrefix)
expireCacheElementsByPrefix(Cache, String)
instead.site
- the Site
to retrieve the cache forcacheElementPrefix
- the prefix to use0
, as the execution is asynchronous@Deprecated public static int expireCacheElementsStartingWith(javax.cache.Cache<String,CachedResponse> cache, String cacheElementPrefix)
expireCacheElementsByPrefix(Cache, String)
instead.cache
- the cache to usecacheElementPrefix
- the prefix to use0
, as the execution is asynchronouspublic static Future<Integer> expireCacheElementsByPrefix(javax.cache.Cache<String,CachedResponse> cache, String cacheElementPrefix)
cache
- the cache to usecacheElementPrefix
- the prefix to useFuture
holding the number of removed elementsCopyright © 2011–2023 aiticon GmbH. All rights reserved.