Record Class EndpointConnectivityController.Sample
java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signaling.provider.connectivity.EndpointConnectivityController.Sample
- Enclosing class:
- EndpointConnectivityController
public static record EndpointConnectivityController.Sample(InetSocketAddress server, InetSocketAddress mapped, EndpointConnectivityController.TransactionState state, long successfulResponses, long failedTransactions, long mappingRevision, Optional<Duration> lastSuccessAge)
extends Record
Atomic native sample. Empty age means no successful Binding response has been received.
-
Constructor Summary
ConstructorsConstructorDescriptionSample(InetSocketAddress server, InetSocketAddress mapped, EndpointConnectivityController.TransactionState state, long successfulResponses, long failedTransactions, long mappingRevision, Optional<Duration> lastSuccessAge) Creates an instance of aSamplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefailedTransactionsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelastSuccessAgerecord component.mapped()Returns the value of themappedrecord component.longReturns the value of themappingRevisionrecord component.server()Returns the value of theserverrecord component.state()Returns the value of thestaterecord component.longReturns the value of thesuccessfulResponsesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Sample
public Sample(InetSocketAddress server, InetSocketAddress mapped, EndpointConnectivityController.TransactionState state, long successfulResponses, long failedTransactions, long mappingRevision, Optional<Duration> lastSuccessAge) Creates an instance of aSamplerecord class.- Parameters:
server- the value for theserverrecord componentmapped- the value for themappedrecord componentstate- the value for thestaterecord componentsuccessfulResponses- the value for thesuccessfulResponsesrecord componentfailedTransactions- the value for thefailedTransactionsrecord componentmappingRevision- the value for themappingRevisionrecord componentlastSuccessAge- the value for thelastSuccessAgerecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
server
Returns the value of theserverrecord component.- Returns:
- the value of the
serverrecord component
-
mapped
Returns the value of themappedrecord component.- Returns:
- the value of the
mappedrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
successfulResponses
public long successfulResponses()Returns the value of thesuccessfulResponsesrecord component.- Returns:
- the value of the
successfulResponsesrecord component
-
failedTransactions
public long failedTransactions()Returns the value of thefailedTransactionsrecord component.- Returns:
- the value of the
failedTransactionsrecord component
-
mappingRevision
public long mappingRevision()Returns the value of themappingRevisionrecord component.- Returns:
- the value of the
mappingRevisionrecord component
-
lastSuccessAge
Returns the value of thelastSuccessAgerecord component.- Returns:
- the value of the
lastSuccessAgerecord component
-