@Internal public class LookupFullCache extends Object implements LookupCache
LookupCache
for LookupOptions.LookupCacheType.FULL
.Constructor and Description |
---|
LookupFullCache(CacheLoader cacheLoader,
CacheReloadTrigger reloadTrigger) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Collection<RowData> |
getIfPresent(RowData key)
Returns the value associated with key in this cache, or null if there is no cached value for
key.
|
void |
invalidate(RowData key)
Discards any cached value for the specified key.
|
void |
open(CacheMetricGroup metricGroup)
Initialize the cache.
|
Collection<RowData> |
put(RowData key,
Collection<RowData> value)
Associates the specified value rows with the specified key row in the cache.
|
void |
setUserCodeClassLoader(ClassLoader userCodeClassLoader) |
long |
size()
Returns the number of key-value mappings in the cache.
|
public LookupFullCache(CacheLoader cacheLoader, CacheReloadTrigger reloadTrigger)
public void setUserCodeClassLoader(ClassLoader userCodeClassLoader)
public void open(CacheMetricGroup metricGroup)
LookupCache
open
in interface LookupCache
metricGroup
- the metric group to register cache related metrics.public Collection<RowData> getIfPresent(RowData key)
LookupCache
getIfPresent
in interface LookupCache
public Collection<RowData> put(RowData key, Collection<RowData> value)
LookupCache
put
in interface LookupCache
key
- - key row with which the specified value is to be associatedvalue
- – value rows to be associated with the specified keypublic void invalidate(RowData key)
LookupCache
invalidate
in interface LookupCache
public long size()
LookupCache
size
in interface LookupCache
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.