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 for DefaultLookupCache.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • 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.