Record Class CosIdProperties.Store

java.lang.Object
java.lang.Record
me.ahoo.cosid.spring.autoconfigure.CosIdProperties.Store
Record Components:
type - the store type: jdbc, redis, mongo, zookeeper, remote (cosid-server) or a StoreProvider bean's
timeout - the operation timeout; default 2s, at most the segment reserve-timeout
client - the name of the bean to use as the client; without it the single bean of the store type's client type in the context (DataSource, Lettuce or RedisConnectionFactory, MongoClient, CuratorFramework), if any
options - backend options, such as initSchema, uri or wait
Enclosing class:
CosIdProperties

public static record CosIdProperties.Store(String type, Duration timeout, String client, Map<String,String> options) extends Record
A store.
  • Constructor Details

    • Store

      public Store(String type, @DefaultValue("2s") Duration timeout, String client, Map<String,String> options)
      Creates an instance of a Store record class.
      Parameters:
      type - the value for the type record component
      timeout - the value for the timeout record component
      client - the value for the client record component
      options - the value for the options record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • timeout

      public Duration timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • client

      public String client()
      Returns the value of the client record component.
      Returns:
      the value of the client record component
    • options

      public Map<String,String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component