public class OrderedHashMapCache<Key,Value> extends java.lang.Object implements CascadingCache<Key,Value>
CascadingCache
interface backed by a LinkedHashMap
. This implementation
is used by default by Unique
and AggregateBy
and their
subclasses.Constructor and Description |
---|
OrderedHashMapCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<Key,Value>> |
entrySet() |
Value |
get(java.lang.Object key) |
int |
getCapacity()
Returns the capacity of this cache.
|
void |
initialize()
Method to initialize the Cache.
|
boolean |
isEmpty() |
java.util.Set<Key> |
keySet() |
Value |
put(Key key,
Value value) |
void |
putAll(java.util.Map<? extends Key,? extends Value> m) |
Value |
remove(java.lang.Object key) |
void |
setCacheEvictionCallback(CacheEvictionCallback cacheEvictionCallback)
Sets the
CacheEvictionCallback of this Cache. |
void |
setCapacity(int capacity)
Sets the capacity of the Cache.
|
int |
size() |
java.util.Collection<Value> |
values() |
public OrderedHashMapCache()
public int getCapacity()
CascadingCache
getCapacity
in interface CascadingCache<Key,Value>
public void setCacheEvictionCallback(CacheEvictionCallback cacheEvictionCallback)
CascadingCache
CacheEvictionCallback
of this Cache.setCacheEvictionCallback
in interface CascadingCache<Key,Value>
public void setCapacity(int capacity)
CascadingCache
setCapacity
in interface CascadingCache<Key,Value>
public void initialize()
CascadingCache
initialize
in interface CascadingCache<Key,Value>
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.