public class CacheManager extends Object
Constructor and Description |
---|
CacheManager(ManageableCache cache,
int cacheMaxSize,
int duration)
A new cacheManager will be started on the given ManageableCache object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
changeDuration(int duration)
Change the cacheManager duration (schedule period) to given value.
|
int |
getDuration() |
boolean |
isRunning() |
boolean |
stop()
Gracefully stop cacheManager.
|
boolean |
wakeUpNow()
Used to wake cacheManager up at will.
|
public CacheManager(ManageableCache cache, int cacheMaxSize, int duration)
cache
- a Manageable Cache which could be managed by this cache manager.cacheMaxSize
- Maximum size of the cache. If the cache exceeds this size, LRU values
will be removedpublic boolean wakeUpNow()
public boolean changeDuration(int duration) throws IllegalArgumentException
duration
- new duration to which the cacheManager schedule period should change.IllegalArgumentException
- if given duration is not between the allowed limit.public int getDuration()
public boolean stop()
public boolean isRunning()
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.