Record Class MessagingStatus
java.lang.Object
java.lang.Record
com.iantapply.relay.api.MessagingStatus
- Record Components:
publisherConnected- whether the publication connection is healthysubscriberConnected- whether the subscription connection is healthynode- local node identifiersubscriptions- number of active topic subscriptionsqueuedHandlers- handlers waiting for an executor threadactiveHandlers- handlers currently executingmaximumHandlers- maximum number of concurrently executing handlers
-
Constructor Summary
ConstructorsConstructorDescriptionMessagingStatus(boolean publisherConnected, boolean subscriberConnected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers) Creates an instance of aMessagingStatusrecord class.MessagingStatus(boolean connected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers) Creates a status for transports that expose only aggregate connectivity. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactiveHandlersrecord component.booleanReports whether both sides of the transport are connected.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaximumHandlersrecord component.node()Returns the value of thenoderecord component.booleanReturns the value of thepublisherConnectedrecord component.intReturns the value of thequeuedHandlersrecord component.booleanReturns the value of thesubscriberConnectedrecord component.intReturns the value of thesubscriptionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessagingStatus
public MessagingStatus(boolean connected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers) Creates a status for transports that expose only aggregate connectivity.- Parameters:
connected- whether both transport roles are connectednode- local node identifiersubscriptions- active topic subscriptionsqueuedHandlers- handlers waiting to runactiveHandlers- handlers currently runningmaximumHandlers- maximum concurrent handlers
-
MessagingStatus
public MessagingStatus(boolean publisherConnected, boolean subscriberConnected, String node, int subscriptions, int queuedHandlers, int activeHandlers, int maximumHandlers) Creates an instance of aMessagingStatusrecord class.- Parameters:
publisherConnected- the value for thepublisherConnectedrecord componentsubscriberConnected- the value for thesubscriberConnectedrecord componentnode- the value for thenoderecord componentsubscriptions- the value for thesubscriptionsrecord componentqueuedHandlers- the value for thequeuedHandlersrecord componentactiveHandlers- the value for theactiveHandlersrecord componentmaximumHandlers- the value for themaximumHandlersrecord component
-
-
Method Details
-
connected
public boolean connected()Reports whether both sides of the transport are connected.- Returns:
truewhen publication and subscription are healthy
-
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. -
publisherConnected
public boolean publisherConnected()Returns the value of thepublisherConnectedrecord component.- Returns:
- the value of the
publisherConnectedrecord component
-
subscriberConnected
public boolean subscriberConnected()Returns the value of thesubscriberConnectedrecord component.- Returns:
- the value of the
subscriberConnectedrecord component
-
node
-
subscriptions
public int subscriptions()Returns the value of thesubscriptionsrecord component.- Returns:
- the value of the
subscriptionsrecord component
-
queuedHandlers
public int queuedHandlers()Returns the value of thequeuedHandlersrecord component.- Returns:
- the value of the
queuedHandlersrecord component
-
activeHandlers
public int activeHandlers()Returns the value of theactiveHandlersrecord component.- Returns:
- the value of the
activeHandlersrecord component
-
maximumHandlers
public int maximumHandlers()Returns the value of themaximumHandlersrecord component.- Returns:
- the value of the
maximumHandlersrecord component
-