com.atlassian.jira.util.cache
Class GenericCompositeKeyCache<K,L,V>
java.lang.Object
com.atlassian.jira.util.cache.GenericCompositeKeyCache<K,L,V>
- Type Parameters:
K
- type of first element of the keyL
- type of second element of the keyV
- type of cached values
@ThreadSafe
public final class GenericCompositeKeyCache<K,L,V>
- extends Object
A simple, unbounded, pluggable cache with composite keys.
- Since:
- v4.2
Method Summary |
V |
get(K first,
L second)
|
static
|
newCache(Function<Pair<M,N>,W> valueRetriever)
Static factory method for convenient instantiation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericCompositeKeyCache
public GenericCompositeKeyCache(Function<Pair<K,L>,V> valueRetriever)
newCache
public static <M,N,W> GenericCompositeKeyCache<M,N,W> newCache(Function<Pair<M,N>,W> valueRetriever)
- Static factory method for convenient instantiation.
- Type Parameters:
M
- type of first element of the keyN
- type of second element of the keyW
- type of cached values- Parameters:
valueRetriever
- value retriever for the cache
- Returns:
- new cache instance
get
public V get(K first,
L second)
Copyright © 2002-2013 Atlassian. All Rights Reserved.