@PublicEvolving public class DefaultLookupCache extends Object implements LookupCache
LookupCache
.Modifier and Type | Class and Description |
---|---|
static class |
DefaultLookupCache.Builder
Builder for
DefaultLookupCache . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object o) |
static DefaultLookupCache |
fromConfig(ReadableConfig config) |
Collection<RowData> |
getIfPresent(RowData key)
Returns the value associated with key in this cache, or null if there is no cached value for
key.
|
int |
hashCode() |
void |
invalidate(RowData key)
Discards any cached value for the specified key.
|
static DefaultLookupCache.Builder |
newBuilder()
Creates a builder for the cache.
|
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.
|
long |
size()
Returns the number of key-value mappings in the cache.
|
public static DefaultLookupCache.Builder newBuilder()
public static DefaultLookupCache fromConfig(ReadableConfig config)
public void open(CacheMetricGroup metricGroup)
LookupCache
open
in interface LookupCache
metricGroup
- the metric group to register cache related metrics.@Nullable 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.