Class OracleCacheConfiguration
java.lang.Object
io.micronaut.cache.CacheConfiguration
io.micronaut.cache.oracle.configuration.OracleCacheConfiguration
@EachProperty("micronaut.caches")
public final class OracleCacheConfiguration
extends CacheConfiguration
Per-cache Oracle provider configuration under
micronaut.caches.*.- Since:
- 6.2.0
- Author:
- Davide Cocco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault cleanup batch size.static final DurationDefault cleanup interval.static final DurationDefault fail-open retry interval.static final DurationDefault lock wait timeout.Fields inherited from class CacheConfiguration
charset, DEFAULT_RECORD_STATS, DEFAULT_TESTMODE, PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionOracleCacheConfiguration(String cacheName, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Creates a new Oracle cache configuration. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the cleanup batch size.@NonNull DurationGets the cleanup interval.@NonNull DurationGets the interval before retrying Oracle after a fail-open repository failure.@NonNull DurationGets the lock wait timeout.booleanChecks whether blocking writes are enabled.booleanChecks whether cache repository failures should be ignored.voidsetBlocking(boolean blocking) Sets whether blocking writes are enabled.voidsetCleanupBatchSize(long cleanupBatchSize) Sets the cleanup batch size.voidsetCleanupInterval(@NonNull Duration cleanupInterval) Sets the cleanup interval.voidsetExpireAfterAccess(Duration expireAfterAccess) voidsetExpireAfterWrite(Duration expireAfterWrite) voidsetFailOpen(boolean failOpen) Sets whether cache repository failures should be ignored.voidsetFailOpenRetryInterval(@NonNull Duration failOpenRetryInterval) Sets the interval before retrying Oracle after a fail-open repository failure.voidsetLockWaitTimeout(@NonNull Duration lockWaitTimeout) Sets the lock wait timeout.voidsetMaximumSize(Long maximumSize) voidsetMaximumWeight(Long maximumWeight) Methods inherited from class CacheConfiguration
getCacheName, getCharset, getExpireAfterAccess, getExpireAfterWrite, getInitialCapacity, getMaximumSize, getMaximumWeight, isRecordStats, isTestMode, setCharset, setInitialCapacity, setRecordStats, setTestMode
-
Field Details
-
DEFAULT_LOCK_WAIT_TIMEOUT
Default lock wait timeout. -
DEFAULT_CLEANUP_INTERVAL
Default cleanup interval. -
DEFAULT_CLEANUP_BATCH_SIZE
public static final long DEFAULT_CLEANUP_BATCH_SIZEDefault cleanup batch size.- See Also:
-
DEFAULT_FAIL_OPEN_RETRY_INTERVAL
Default fail-open retry interval.
-
-
Constructor Details
-
OracleCacheConfiguration
public OracleCacheConfiguration(@Parameter String cacheName, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration) Creates a new Oracle cache configuration.- Parameters:
cacheName- The cache nameapplicationConfiguration- The application configuration
-
-
Method Details
-
isBlocking
public boolean isBlocking()Checks whether blocking writes are enabled.- Returns:
- Whether writes use the database-coordinated blocking procedure
-
setBlocking
public void setBlocking(boolean blocking) Sets whether blocking writes are enabled.- Parameters:
blocking- Whether writes should use the database-coordinated blocking procedure
-
isFailOpen
public boolean isFailOpen()Checks whether cache repository failures should be ignored.- Returns:
- Whether cache failures should fall back to the underlying operation
-
setFailOpen
public void setFailOpen(boolean failOpen) Sets whether cache repository failures should be ignored.- Parameters:
failOpen- Whether cache failures should fall back to the underlying operation
-
getFailOpenRetryInterval
Gets the interval before retrying Oracle after a fail-open repository failure.- Returns:
- The fail-open retry interval
-
setFailOpenRetryInterval
Sets the interval before retrying Oracle after a fail-open repository failure.- Parameters:
failOpenRetryInterval- The fail-open retry interval
-
getLockWaitTimeout
Gets the lock wait timeout.- Returns:
- The lock wait timeout used by blocking cache writes
-
setLockWaitTimeout
Sets the lock wait timeout.- Parameters:
lockWaitTimeout- The lock wait timeout used by blocking cache writes
-
getCleanupInterval
Gets the cleanup interval.- Returns:
- The cleanup interval
-
setCleanupInterval
Sets the cleanup interval.- Parameters:
cleanupInterval- The cleanup interval
-
getCleanupBatchSize
public long getCleanupBatchSize()Gets the cleanup batch size.- Returns:
- The cleanup batch size
-
setCleanupBatchSize
public void setCleanupBatchSize(long cleanupBatchSize) Sets the cleanup batch size.- Parameters:
cleanupBatchSize- The cleanup batch size
-
setMaximumSize
- Overrides:
setMaximumSizein classCacheConfiguration- Parameters:
maximumSize- The maximum cache size
-
setMaximumWeight
- Overrides:
setMaximumWeightin classCacheConfiguration- Parameters:
maximumWeight- The maximum cache weight
-
setExpireAfterWrite
- Overrides:
setExpireAfterWritein classCacheConfiguration- Parameters:
expireAfterWrite- The expire-after-write duration
-
setExpireAfterAccess
- Overrides:
setExpireAfterAccessin classCacheConfiguration- Parameters:
expireAfterAccess- The expire-after-access duration
-