Record Class GenericMapStoreConfig
java.lang.Object
java.lang.Record
com.loomcache.common.config.GenericMapStoreConfig
- Record Components:
enabled- whether the generic store should be wireddataConnectionRef- name of theDataConnectionConfigto usetableName- table that stores map entriesmapNameColumn- column containing the LoomCache map namekeyColumn- column containing the map keyvalueColumn- column containing the string valuewriteThrough- synchronous write-through modewriteBehind- asynchronous write-behind modewriteBatchSize- maximum write-behind batch sizewriteDelay- write-behind flush intervalloadMode- lazy or eager store loadingmaxLoadKeys- upper bound for eager/loadAllKeys scans
public record GenericMapStoreConfig(boolean enabled, String dataConnectionRef, String tableName, String mapNameColumn, String keyColumn, String valueColumn, boolean writeThrough, boolean writeBehind, int writeBatchSize, Duration writeDelay, GenericMapStoreConfig.LoadMode loadMode, int maxLoadKeys)
extends Record
Declarative built-in JDBC MapStore configuration for a String/String map.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenericMapStoreConfig(boolean enabled, String dataConnectionRef, String tableName, String mapNameColumn, String keyColumn, String valueColumn, boolean writeThrough, boolean writeBehind, int writeBatchSize, Duration writeDelay, GenericMapStoreConfig.LoadMode loadMode, int maxLoadKeys) Creates an instance of aGenericMapStoreConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns the value of thedataConnectionRefrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyColumnrecord component.loadMode()Returns the value of theloadModerecord component.Returns the value of themapNameColumnrecord component.intReturns the value of themaxLoadKeysrecord component.parseLoadMode(String raw) Returns the value of thetableNamerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalueColumnrecord component.intReturns the value of thewriteBatchSizerecord component.booleanReturns the value of thewriteBehindrecord component.Returns the value of thewriteDelayrecord component.booleanReturns the value of thewriteThroughrecord component.
-
Field Details
-
DEFAULT_TABLE_NAME
- See Also:
-
DEFAULT_MAP_NAME_COLUMN
- See Also:
-
DEFAULT_KEY_COLUMN
- See Also:
-
DEFAULT_VALUE_COLUMN
- See Also:
-
DEFAULT_WRITE_BATCH_SIZE
public static final int DEFAULT_WRITE_BATCH_SIZE- See Also:
-
DEFAULT_WRITE_DELAY
-
DEFAULT_MAX_LOAD_KEYS
public static final int DEFAULT_MAX_LOAD_KEYS- See Also:
-
-
Constructor Details
-
GenericMapStoreConfig
public GenericMapStoreConfig(boolean enabled, String dataConnectionRef, String tableName, String mapNameColumn, String keyColumn, String valueColumn, boolean writeThrough, boolean writeBehind, int writeBatchSize, Duration writeDelay, GenericMapStoreConfig.LoadMode loadMode, int maxLoadKeys) Creates an instance of aGenericMapStoreConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componentdataConnectionRef- the value for thedataConnectionRefrecord componenttableName- the value for thetableNamerecord componentmapNameColumn- the value for themapNameColumnrecord componentkeyColumn- the value for thekeyColumnrecord componentvalueColumn- the value for thevalueColumnrecord componentwriteThrough- the value for thewriteThroughrecord componentwriteBehind- the value for thewriteBehindrecord componentwriteBatchSize- the value for thewriteBatchSizerecord componentwriteDelay- the value for thewriteDelayrecord componentloadMode- the value for theloadModerecord componentmaxLoadKeys- the value for themaxLoadKeysrecord component
-
-
Method Details
-
builder
-
parseLoadMode
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enabled
-
dataConnectionRef
Returns the value of thedataConnectionRefrecord component.- Returns:
- the value of the
dataConnectionRefrecord component
-
tableName
-
mapNameColumn
Returns the value of themapNameColumnrecord component.- Returns:
- the value of the
mapNameColumnrecord component
-
keyColumn
-
valueColumn
Returns the value of thevalueColumnrecord component.- Returns:
- the value of the
valueColumnrecord component
-
writeThrough
public boolean writeThrough()Returns the value of thewriteThroughrecord component.- Returns:
- the value of the
writeThroughrecord component
-
writeBehind
public boolean writeBehind()Returns the value of thewriteBehindrecord component.- Returns:
- the value of the
writeBehindrecord component
-
writeBatchSize
public int writeBatchSize()Returns the value of thewriteBatchSizerecord component.- Returns:
- the value of the
writeBatchSizerecord component
-
writeDelay
Returns the value of thewriteDelayrecord component.- Returns:
- the value of the
writeDelayrecord component
-
loadMode
-
maxLoadKeys
public int maxLoadKeys()Returns the value of themaxLoadKeysrecord component.- Returns:
- the value of the
maxLoadKeysrecord component
-