public abstract class CacheLoader extends Object implements AutoCloseable, Serializable
ScanTableSource.ScanRuntimeProvider
.Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<RowData,Collection<RowData>> |
cache |
protected boolean |
isStopped |
protected static long |
TIMEOUT_AFTER_INTERRUPT_MS |
Constructor and Description |
---|
CacheLoader() |
Modifier and Type | Method and Description |
---|---|
void |
awaitFirstLoad() |
void |
close() |
ConcurrentHashMap<RowData,Collection<RowData>> |
getCache() |
void |
initializeMetrics(CacheMetricGroup cacheMetricGroup) |
void |
open(Configuration parameters,
ClassLoader userCodeClassLoader) |
CompletableFuture<Void> |
reloadAsync() |
protected abstract boolean |
updateCache() |
protected static final long TIMEOUT_AFTER_INTERRUPT_MS
protected transient volatile ConcurrentHashMap<RowData,Collection<RowData>> cache
protected volatile boolean isStopped
protected abstract boolean updateCache() throws Exception
Exception
public void open(Configuration parameters, ClassLoader userCodeClassLoader) throws Exception
Exception
public void initializeMetrics(CacheMetricGroup cacheMetricGroup)
public ConcurrentHashMap<RowData,Collection<RowData>> getCache()
public void awaitFirstLoad() throws InterruptedException
InterruptedException
public CompletableFuture<Void> reloadAsync()
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.