Class DefaultHalResourceCache
java.lang.Object
org.camunda.bpm.engine.rest.hal.cache.DefaultHalResourceCache
- All Implemented Interfaces:
Cache
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<String,
HalResourceCacheEntry> protected int
static final Comparator<HalResourceCacheEntry>
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy cache.protected void
protected boolean
expired
(HalResourceCacheEntry entry) Get a resource by id.int
long
void
Put a resource into the cache.void
void
setCapacity
(int capacity) void
setSecondsToLive
(long secondsToLive) int
size()
-
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:Cache
Put a resource into the cache. -
remove
-
get
Description copied from interface:Cache
Get a resource by id. -
destroy
public void destroy()Description copied from interface:Cache
Destroy cache. -
ensureCapacityLimit
protected void ensureCapacityLimit() -
expired
-