| Modifier and Type | Class and Description |
|---|---|
| public static interface | EvictableCache.Action<
key type K, value type V, result type R>Represents the action to deal with the cache |
| public static enum | EvictableCache.EvictionStrategy
Represents a eviction strategy for the cache with limited size |
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public Map | |
| public boolean | Returns: true if the cache contains a mapping for the specified keykey whose presence in this cache is to be tested. key)Redeclares java. |
| public Set | |
| public V | Returns: returns the removed valueof the cached value key)Redeclares java. |
| public int | |
| public Collection |
| clear | back to summary |
|---|---|
| public default void clear() Implements java. Clear the cache
| |
| clearAll | back to summary |
|---|---|
| public Map Clear the cache
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Redeclares java. Determines if the cache contains an entry for the specified key.
| |
| keys | back to summary |
|---|---|
| public Set Get all keys associated to cached values
| |
| remove | back to summary |
|---|---|
| public V remove(Object key) Redeclares java. Remove the cached value by the key
| |
| size | back to summary |
|---|---|
| public int size() Redeclares java. Get the size of the cache
| |
| values | back to summary |
|---|---|
| public Collection Redeclares java. Get all cached values
| |
| Modifier and Type | Method and Description |
|---|---|
| public R |
| doWith | back to summary |
|---|---|
| public R doWith(EvictableCache<K, V> evictableCache) Deal with the cache | |
| Modifier and Type | Field and Description |
|---|---|
| public static final EvictableCache. | FIFO
Entries are evicted in the same order as they come in |
| public static final EvictableCache. | LRU
The oldest entry(i.e. the Less Recently Used entry) will be evicted |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static EvictableCache. | |
| public static EvictableCache. |
| FIFO | back to summary |
|---|---|
| public static final EvictableCache. Entries are evicted in the same order as they come in | |
| LRU | back to summary |
|---|---|
| public static final EvictableCache. The oldest entry(i.e. the Less Recently Used entry) will be evicted | |
| EvictionStrategy | back to summary |
|---|---|
| private EvictionStrategy() | |
| valueOf | back to summary |
|---|---|
| public static EvictableCache. | |
| values | back to summary |
|---|---|
| public static EvictableCache. | |