Record Class RelayConfig
java.lang.Object
java.lang.Record
com.iantapply.relay.core.RelayConfig
- Record Components:
nodeId- unique identifier for this server or proxyrole- platform role of this noderedisUri- Redis connection URI usingredisorredissnamespace- logical Redis channel namespacemaximumPayloadBytes- largest accepted decoded payloaddispatchWorkers- number of concurrent handler workersdispatchQueueCapacity- maximum number of queued handler invocationsmaximumMessageAge- maximum accepted message age, or zero to disable the check
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumPlatform roles understood by Relay routing. -
Constructor Summary
ConstructorsConstructorDescriptionRelayConfig(String nodeId, RelayConfig.NodeRole role, URI redisUri, String namespace, int maximumPayloadBytes, int dispatchWorkers, int dispatchQueueCapacity, Duration maximumMessageAge) Validates all runtime settings. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedispatchQueueCapacityrecord component.intReturns the value of thedispatchWorkersrecord 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 themaximumMessageAgerecord component.intReturns the value of themaximumPayloadBytesrecord component.Returns the value of thenamespacerecord component.nodeId()Returns the value of thenodeIdrecord component.redisUri()Returns the value of theredisUrirecord component.role()Returns the value of therolerecord component.final StringtoString()Returns a string representation of this record class.
-
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 proxyrole- platform role of this noderedisUri- Redis connection URInamespace- logical Redis channel namespacemaximumPayloadBytes- largest accepted decoded payloaddispatchWorkers- number of concurrent handler workersdispatchQueueCapacity- maximum queued handler invocationsmaximumMessageAge- maximum accepted message age
-
-
Method Details
-
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. -
nodeId
-
role
-
redisUri
-
namespace
-
maximumPayloadBytes
public int maximumPayloadBytes()Returns the value of themaximumPayloadBytesrecord component.- Returns:
- the value of the
maximumPayloadBytesrecord component
-
dispatchWorkers
public int dispatchWorkers()Returns the value of thedispatchWorkersrecord component.- Returns:
- the value of the
dispatchWorkersrecord component
-
dispatchQueueCapacity
public int dispatchQueueCapacity()Returns the value of thedispatchQueueCapacityrecord component.- Returns:
- the value of the
dispatchQueueCapacityrecord component
-
maximumMessageAge
Returns the value of themaximumMessageAgerecord component.- Returns:
- the value of the
maximumMessageAgerecord component
-