@PublicEvolving public static class DefaultLookupCache.Builder extends Object
DefaultLookupCache
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultLookupCache |
build()
Creates the cache.
|
DefaultLookupCache.Builder |
cacheMissingKey(boolean cacheMissingKey)
Specifies whether to cache empty value into the cache.
|
DefaultLookupCache.Builder |
expireAfterAccess(java.time.Duration duration)
Specifies the duration after an entry is last accessed that it should be automatically
removed.
|
DefaultLookupCache.Builder |
expireAfterWrite(java.time.Duration duration)
Specifies the duration after an entry is created that it should be automatically removed.
|
DefaultLookupCache.Builder |
maximumSize(long maximumSize)
Specifies the maximum number of entries of the cache.
|
public DefaultLookupCache.Builder expireAfterAccess(java.time.Duration duration)
public DefaultLookupCache.Builder expireAfterWrite(java.time.Duration duration)
public DefaultLookupCache.Builder maximumSize(long maximumSize)
public DefaultLookupCache.Builder cacheMissingKey(boolean cacheMissingKey)
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.
public DefaultLookupCache build()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.