com.atlassian.bamboo.util
Class NullAwareCache<K,V>
java.lang.Object
com.atlassian.bamboo.util.NullAwareCache<K,V>
- Type Parameters:
K
- V
-
- All Implemented Interfaces:
- com.google.common.base.Function<K,V>, com.google.common.cache.Cache<K,V>
public class NullAwareCache<K,V>
- extends java.lang.Object
- implements com.google.common.cache.Cache<K,V>
This class provides a Guava-compatible cache capable of storing null values. In general, it should not be
used unless for backward compatibility reasons.
Constructor Summary |
NullAwareCache(com.google.common.cache.Cache<K,com.atlassian.fage.Option<V>> cache)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullAwareCache
public NullAwareCache(com.google.common.cache.Cache<K,com.atlassian.fage.Option<V>> cache)
get
@Nullable
public V get(K key)
throws java.util.concurrent.ExecutionException
- Specified by:
get
in interface com.google.common.cache.Cache<K,V>
- Throws:
java.util.concurrent.ExecutionException
getUnchecked
@Nullable
public V getUnchecked(K key)
- Specified by:
getUnchecked
in interface com.google.common.cache.Cache<K,V>
apply
@Nullable
public V apply(K key)
- Specified by:
apply
in interface com.google.common.base.Function<K,V>
- Specified by:
apply
in interface com.google.common.cache.Cache<K,V>
invalidate
public void invalidate(java.lang.Object key)
- Specified by:
invalidate
in interface com.google.common.cache.Cache<K,V>
invalidateAll
public void invalidateAll()
- Specified by:
invalidateAll
in interface com.google.common.cache.Cache<K,V>
size
public long size()
- Specified by:
size
in interface com.google.common.cache.Cache<K,V>
stats
public com.google.common.cache.CacheStats stats()
- Specified by:
stats
in interface com.google.common.cache.Cache<K,V>
asMap
public java.util.concurrent.ConcurrentMap<K,V> asMap()
- Specified by:
asMap
in interface com.google.common.cache.Cache<K,V>
cleanUp
public void cleanUp()
- Specified by:
cleanUp
in interface com.google.common.cache.Cache<K,V>
equals
public boolean equals(@Nullable
java.lang.Object object)
- Specified by:
equals
in interface com.google.common.base.Function<K,V>
- Overrides:
equals
in class java.lang.Object
Copyright © 2012 Atlassian. All Rights Reserved.