public abstract class AbstractBlockingCache extends AbstractListeningCacheWrapper implements BlockingCache
BlockingCache
.Constructor and Description |
---|
AbstractBlockingCache(String name,
CacheModule cacheModule,
Integer blockingTimeout) |
Modifier and Type | Method and Description |
---|---|
Object |
get(Object key) |
int |
getBlockingTimeout()
If the timeout is reached an exception is thrown to unlock the blocked thread (in
milliseconds).
|
String |
getName() |
boolean |
hasElement(Object key) |
void |
put(Object key,
Object value) |
void |
put(Object key,
Object value,
int timeToLiveInSeconds) |
protected abstract void |
putQuiet(Object key,
Object value,
int timeToLiveInSeconds) |
void |
unlock(Object key)
Will unlock the key.
|
clear, getQuiet, getSize, remove
public AbstractBlockingCache(String name, CacheModule cacheModule, Integer blockingTimeout)
public final Object get(Object key)
get
in interface Cache
get
in class AbstractListeningCacheWrapper
public final boolean hasElement(Object key)
hasElement
in interface Cache
public final void put(Object key, Object value)
put
in interface Cache
put
in class AbstractListeningCacheWrapper
public final void put(Object key, Object value, int timeToLiveInSeconds)
put
in interface Cache
put
in class AbstractListeningCacheWrapper
public final void unlock(Object key)
BlockingCache
unlock
in interface BlockingCache
public int getBlockingTimeout()
BlockingCache
getBlockingTimeout
in interface BlockingCache
public String getName()
getName
in interface Cache
getName
in class AbstractListeningCacheWrapper
Copyright © 2017 Magnolia International Ltd.. All rights reserved.