Record Class RelayConfig

java.lang.Object
java.lang.Record
com.iantapply.relay.core.RelayConfig
Record Components:
nodeId - unique identifier for this server or proxy
role - platform role of this node
redisUri - Redis connection URI using redis or rediss
namespace - logical Redis channel namespace
maximumPayloadBytes - largest accepted decoded payload
dispatchWorkers - number of concurrent handler workers
dispatchQueueCapacity - maximum number of queued handler invocations
maximumMessageAge - maximum accepted message age, or zero to disable the check

public record RelayConfig(String nodeId, RelayConfig.NodeRole role, URI redisUri, String namespace, int maximumPayloadBytes, int dispatchWorkers, int dispatchQueueCapacity, Duration maximumMessageAge) extends Record
Validated runtime configuration shared by Relay's platform adapters and core.
  • Constructor Details

    • RelayConfig

      public RelayConfig(String nodeId, RelayConfig.NodeRole role, URI redisUri, String namespace, int maximumPayloadBytes, int dispatchWorkers, int dispatchQueueCapacity, Duration maximumMessageAge)
      Validates all runtime settings.
      Parameters:
      nodeId - unique identifier for this server or proxy
      role - platform role of this node
      redisUri - Redis connection URI
      namespace - logical Redis channel namespace
      maximumPayloadBytes - largest accepted decoded payload
      dispatchWorkers - number of concurrent handler workers
      dispatchQueueCapacity - maximum queued handler invocations
      maximumMessageAge - maximum accepted message age
  • 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. 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.
    • nodeId

      public String nodeId()
      Returns the value of the nodeId record component.
      Returns:
      the value of the nodeId record component
    • role

      public RelayConfig.NodeRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • redisUri

      public URI redisUri()
      Returns the value of the redisUri record component.
      Returns:
      the value of the redisUri record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • maximumPayloadBytes

      public int maximumPayloadBytes()
      Returns the value of the maximumPayloadBytes record component.
      Returns:
      the value of the maximumPayloadBytes record component
    • dispatchWorkers

      public int dispatchWorkers()
      Returns the value of the dispatchWorkers record component.
      Returns:
      the value of the dispatchWorkers record component
    • dispatchQueueCapacity

      public int dispatchQueueCapacity()
      Returns the value of the dispatchQueueCapacity record component.
      Returns:
      the value of the dispatchQueueCapacity record component
    • maximumMessageAge

      public Duration maximumMessageAge()
      Returns the value of the maximumMessageAge record component.
      Returns:
      the value of the maximumMessageAge record component