Package com.clickhouse.data
Interface ClickHouseCache<K,V>
Deprecated.
Wrapper interface depicts essential methods required by a client-side cache.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.Default cache size. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> ClickHouseCache<K, V> Deprecated.Creates a cache with specific capacity and load function.Deprecated.Gets value from cache if it exists.<T> TDeprecated.Gets inner cache object to gain more access.
-
Field Details
-
DEFAULT_CACHE_SIZE
static final int DEFAULT_CACHE_SIZEDeprecated.Default cache size.- See Also:
-
-
Method Details
-
create
Deprecated.Creates a cache with specific capacity and load function.- Type Parameters:
K- type of keyV- type of value- Parameters:
capacity- capacity of the cache, zero or negative number will be treated asDEFAULT_CACHE_SIZEexpireSeconds- seconds to expire after accessloadFunc- non-null load function- Returns:
- cache
-
get
Deprecated.Gets value from cache if it exists.- Parameters:
key- key, in genernal should NOT be null- Returns:
- non-null value in general
-
unwrap
Deprecated.Gets inner cache object to gain more access.- Type Parameters:
T- type of the cache- Parameters:
clazz- non-null class of the cache- Returns:
- inner cache object
- Throws:
NullPointerException- whenclazzis null
-