|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.cache.DefaultCacheClient
org.norther.tammi.core.cache.DefaultKeyCacheClient
public class DefaultKeyCacheClient
A default implementation of KeyCacheClient.
| Field Summary | |
|---|---|
static String |
DEFAULT_CACHE_KEY_NAME
The default cache key name in object names. |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultKeyCacheClient()
Constructs a new client. |
|
DefaultKeyCacheClient(String key)
Constructs a new client with a cache key. |
|
| Method Summary | |
|---|---|
Set |
cacheKeySet()
Returns the cache key set. |
void |
clearCached()
Clears all cached entries without notifying. |
void |
clearCaches()
Removes all caches. |
void |
expireCached(long timestamp)
Expires all cached entries notifying them about expiration. |
void |
expireFraction(long timestamp,
float fraction)
Expires the specified fraction of cached entries notifying them about expiration. |
ConcurrentMap |
getCache(String key,
boolean create)
Gets and optionally creates the cache for the specified key. |
void |
handleNotification(Notification notif,
Object handback)
Handle domain cache removals. |
void |
removeCache(String key)
Removes the specified cache. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
| Methods inherited from class org.norther.tammi.core.cache.DefaultCacheClient |
|---|
getCache, getClientCache, getExpired, getRefreshed, getSharedCache, isCachingDisabled, postmanaged, refresh, removeCache, setCachingDisabled |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.core.cache.CacheClient |
|---|
getCache, isCachingDisabled, removeCache, setCachingDisabled |
| Methods inherited from interface org.norther.tammi.core.base.Refreshable |
|---|
getRefreshed, refresh |
| Field Detail |
|---|
public static final String DEFAULT_CACHE_KEY_NAME
| Constructor Detail |
|---|
public DefaultKeyCacheClient()
public DefaultKeyCacheClient(String key)
key - the cache key to apply in object names.| Method Detail |
|---|
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class DefaultCacheClientException - if the adaptee refused to be unmanaged.public void expireCached(long timestamp)
CacheClient
expireCached in interface CacheClientexpireCached in class DefaultCacheClienttimestamp - the timestamp of the expiration.
public void expireFraction(long timestamp,
float fraction)
CacheClient
expireFraction in interface CacheClientexpireFraction in class DefaultCacheClienttimestamp - the timestamp of the expiration.fraction - the fraction of entries to expire (0.0..1.0).public void clearCached()
CacheClient
clearCached in interface CacheClientclearCached in class DefaultCacheClient
public ConcurrentMap getCache(String key,
boolean create)
KeyCacheClient
getCache in interface KeyCacheClientkey - the cache key.create - true to create a missing cache.
public void removeCache(String key)
KeyCacheClient
removeCache in interface KeyCacheClientkey - the cache key.public Set cacheKeySet()
KeyCacheClient
cacheKeySet in interface KeyCacheClientpublic void clearCaches()
KeyCacheClient
clearCaches in interface KeyCacheClient
public void handleNotification(Notification notif,
Object handback)
DefaultCacheClient
handleNotification in interface NotificationListenerhandleNotification in class DefaultCacheClientnotif - the notification.handback - not used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||