Record Class GenericMapStoreConfig

java.lang.Object
java.lang.Record
com.loomcache.common.config.GenericMapStoreConfig
Record Components:
enabled - whether the generic store should be wired
dataConnectionRef - name of the DataConnectionConfig to use
tableName - table that stores map entries
mapNameColumn - column containing the LoomCache map name
keyColumn - column containing the map key
valueColumn - column containing the string value
writeThrough - synchronous write-through mode
writeBehind - asynchronous write-behind mode
writeBatchSize - maximum write-behind batch size
writeDelay - write-behind flush interval
loadMode - lazy or eager store loading
maxLoadKeys - 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.
  • Field Details

  • 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 a GenericMapStoreConfig record class.
      Parameters:
      enabled - the value for the enabled record component
      dataConnectionRef - the value for the dataConnectionRef record component
      tableName - the value for the tableName record component
      mapNameColumn - the value for the mapNameColumn record component
      keyColumn - the value for the keyColumn record component
      valueColumn - the value for the valueColumn record component
      writeThrough - the value for the writeThrough record component
      writeBehind - the value for the writeBehind record component
      writeBatchSize - the value for the writeBatchSize record component
      writeDelay - the value for the writeDelay record component
      loadMode - the value for the loadMode record component
      maxLoadKeys - the value for the maxLoadKeys record component
  • Method Details

    • builder

      public static GenericMapStoreConfig.Builder builder()
    • parseLoadMode

      public static GenericMapStoreConfig.LoadMode parseLoadMode(String raw)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • dataConnectionRef

      public String dataConnectionRef()
      Returns the value of the dataConnectionRef record component.
      Returns:
      the value of the dataConnectionRef record component
    • tableName

      public String tableName()
      Returns the value of the tableName record component.
      Returns:
      the value of the tableName record component
    • mapNameColumn

      public String mapNameColumn()
      Returns the value of the mapNameColumn record component.
      Returns:
      the value of the mapNameColumn record component
    • keyColumn

      public String keyColumn()
      Returns the value of the keyColumn record component.
      Returns:
      the value of the keyColumn record component
    • valueColumn

      public String valueColumn()
      Returns the value of the valueColumn record component.
      Returns:
      the value of the valueColumn record component
    • writeThrough

      public boolean writeThrough()
      Returns the value of the writeThrough record component.
      Returns:
      the value of the writeThrough record component
    • writeBehind

      public boolean writeBehind()
      Returns the value of the writeBehind record component.
      Returns:
      the value of the writeBehind record component
    • writeBatchSize

      public int writeBatchSize()
      Returns the value of the writeBatchSize record component.
      Returns:
      the value of the writeBatchSize record component
    • writeDelay

      public Duration writeDelay()
      Returns the value of the writeDelay record component.
      Returns:
      the value of the writeDelay record component
    • loadMode

      public GenericMapStoreConfig.LoadMode loadMode()
      Returns the value of the loadMode record component.
      Returns:
      the value of the loadMode record component
    • maxLoadKeys

      public int maxLoadKeys()
      Returns the value of the maxLoadKeys record component.
      Returns:
      the value of the maxLoadKeys record component