Class DefaultHalResourceCache
java.lang.Object
org.camunda.bpm.engine.rest.hal.cache.DefaultHalResourceCache
- All Implemented Interfaces:
Cache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,HalResourceCacheEntry> protected intstatic final Comparator<HalResourceCacheEntry>protected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy cache.protected voidprotected booleanexpired(HalResourceCacheEntry entry) Get a resource by id.intlongvoidPut a resource into the cache.voidvoidsetCapacity(int capacity) voidsetSecondsToLive(long secondsToLive) intsize()
-
Field Details
-
COMPARATOR
-
capacity
protected int capacity -
secondsToLive
protected long secondsToLive -
cache
-
-
Constructor Details
-
DefaultHalResourceCache
public DefaultHalResourceCache() -
DefaultHalResourceCache
public DefaultHalResourceCache(int capacity, long secondsToLive)
-
-
Method Details
-
getCapacity
public int getCapacity() -
setCapacity
public void setCapacity(int capacity) -
getSecondsToLive
public long getSecondsToLive() -
setSecondsToLive
public void setSecondsToLive(long secondsToLive) -
size
public int size() -
put
Description copied from interface:CachePut a resource into the cache. -
remove
-
get
Description copied from interface:CacheGet a resource by id. -
destroy
public void destroy()Description copied from interface:CacheDestroy cache. -
ensureCapacityLimit
protected void ensureCapacityLimit() -
expired
-