Package com.landawn.abacus.cache
Class AbstractCache<K,V>
java.lang.Object
com.landawn.abacus.cache.AbstractCache<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
Cache<K,,V> Closeable,AutoCloseable
- Direct Known Subclasses:
CaffeineCache,DistributedCache,Ehcache,LocalCache,OffHeapCache
- Since:
- 0.8
- Author:
- Haiyang Li
-
Field Summary
Fields inherited from interface com.landawn.abacus.cache.Cache
DEFAULT_LIVE_TIME, DEFAULT_MAX_IDLE_TIME -
Method Summary
Modifier and TypeMethodDescriptioncom.landawn.abacus.util.ContinuableFuture<Boolean>Async contains key.com.landawn.abacus.util.ContinuableFuture<com.landawn.abacus.util.u.Optional<V>>com.landawn.abacus.util.ContinuableFuture<V>com.landawn.abacus.util.ContinuableFuture<Boolean>com.landawn.abacus.util.ContinuableFuture<Boolean>com.landawn.abacus.util.ContinuableFuture<Void>asyncRemove(K k) com.landawn.abacus.util.u.Optional<V>Gets the properties.<T> TgetProperty(String propName) Gets the property.boolean<T> TremoveProperty(String propName) Removes the property.<T> TsetProperty(String propName, Object propValue) Sets the property.
-
Method Details
-
get
-
put
-
asyncGet
-
asyncGett
-
asyncPut
-
asyncPut
-
asyncRemove
- Specified by:
asyncRemovein interfaceCache<K,V> - Parameters:
k-- Returns:
-
asyncContainsKey
Async contains key.- Specified by:
asyncContainsKeyin interfaceCache<K,V> - Parameters:
k-- Returns:
-
getProperties
Gets the properties.- Specified by:
getPropertiesin interfaceCache<K,V> - Returns:
-
getProperty
Gets the property.- Specified by:
getPropertyin interfaceCache<K,V> - Type Parameters:
T-- Parameters:
propName-- Returns:
-
setProperty
Sets the property.- Specified by:
setPropertyin interfaceCache<K,V> - Type Parameters:
T-- Parameters:
propName-propValue-- Returns:
-
removeProperty
Removes the property.- Specified by:
removePropertyin interfaceCache<K,V> - Type Parameters:
T-- Parameters:
propName-- Returns:
-