Class DefaultLookupCache.Builder
- java.lang.Object
-
- org.apache.flink.table.connector.source.lookup.cache.DefaultLookupCache.Builder
-
- Enclosing class:
- DefaultLookupCache
@PublicEvolving public static class DefaultLookupCache.Builder extends Object
Builder forDefaultLookupCache.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultLookupCachebuild()Creates the cache.DefaultLookupCache.BuildercacheMissingKey(boolean cacheMissingKey)Specifies whether to cache empty value into the cache.DefaultLookupCache.BuilderexpireAfterAccess(Duration duration)Specifies the duration after an entry is last accessed that it should be automatically removed.DefaultLookupCache.BuilderexpireAfterWrite(Duration duration)Specifies the duration after an entry is created that it should be automatically removed.DefaultLookupCache.BuildermaximumSize(long maximumSize)Specifies the maximum number of entries of the cache.
-
-
-
Method Detail
-
expireAfterAccess
public DefaultLookupCache.Builder expireAfterAccess(Duration duration)
Specifies the duration after an entry is last accessed that it should be automatically removed.
-
expireAfterWrite
public DefaultLookupCache.Builder expireAfterWrite(Duration duration)
Specifies the duration after an entry is created that it should be automatically removed.
-
maximumSize
public DefaultLookupCache.Builder maximumSize(long maximumSize)
Specifies the maximum number of entries of the cache.
-
cacheMissingKey
public DefaultLookupCache.Builder cacheMissingKey(boolean cacheMissingKey)
Specifies whether to cache empty value into the cache.Please note that "empty" means a collection without any rows in it instead of null. The cache will not accept any null key or value.
-
build
public DefaultLookupCache build()
Creates the cache.
-
-