public final class Cache extends Object implements TreeCache
java.util.concurrent
). After the cache size reached a certain
limit, some least recently used entry are removed, when adding a new entry.Constructor and Description |
---|
Cache(int capacity)
Creates a new cache with the specified capacity
and default concurrency level (16).
|
Cache(int capacity,
int concurrencyLevel)
Creates a new cache with the specified capacity and concurrency level.
|
Modifier and Type | Method and Description |
---|---|
Tree |
get(String expression)
Lookup tree
|
void |
put(String expression,
Tree tree)
Cache tree
|
int |
size() |
public Cache(int capacity)
capacity
- Cache size. The actual size may exceed it temporarily.public Cache(int capacity, int concurrencyLevel)
capacity
- Cache size. The actual map size may exceed it temporarily.concurrencyLevel
- The estimated number of concurrently updating threads. The
implementation performs internal sizing to try to accommodate
this many threads.Copyright © 2006–2017 Odysseus Software GmbH. All rights reserved.