Record Class ServiceUnitStateData
java.lang.Object
java.lang.Record
org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateData
public record ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, Map<String,Optional<String>> splitServiceUnitToDestBroker, boolean force, long timestamp, long versionId)
extends Record
Defines data for the service unit state changes.
This data will be broadcast in ServiceUnitStateChannel.
-
Constructor Summary
ConstructorsConstructorDescriptionServiceUnitStateData(ServiceUnitState state, String dstBroker, boolean force, long versionId) ServiceUnitStateData(ServiceUnitState state, String dstBroker, long versionId) ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, boolean force, long versionId) ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, long versionId) ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, Map<String, Optional<String>> splitServiceUnitToDestBroker, boolean force, long versionId) ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, Map<String, Optional<String>> splitServiceUnitToDestBroker, boolean force, long timestamp, long versionId) Creates an instance of aServiceUnitStateDatarecord class.ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, Map<String, Optional<String>> splitServiceUnitToDestBroker, long versionId) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedstBrokerrecord component.booleanIndicates whether some other object is "equal to" this one.booleanforce()Returns the value of theforcerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thesourceBrokerrecord component.Returns the value of thesplitServiceUnitToDestBrokerrecord component.state()Returns the value of thestaterecord component.static ServiceUnitStatestate(ServiceUnitStateData data) longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theversionIdrecord component.
-
Constructor Details
-
ServiceUnitStateData
public ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, Map<String, Optional<String>> splitServiceUnitToDestBroker, boolean force, long timestamp, long versionId) Creates an instance of aServiceUnitStateDatarecord class.- Parameters:
state- the value for thestaterecord componentdstBroker- the value for thedstBrokerrecord componentsourceBroker- the value for thesourceBrokerrecord componentsplitServiceUnitToDestBroker- the value for thesplitServiceUnitToDestBrokerrecord componentforce- the value for theforcerecord componenttimestamp- the value for thetimestamprecord componentversionId- the value for theversionIdrecord component
-
ServiceUnitStateData
-
ServiceUnitStateData
-
ServiceUnitStateData
public ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, long versionId) -
ServiceUnitStateData
public ServiceUnitStateData(ServiceUnitState state, String dstBroker, String sourceBroker, boolean force, long versionId) -
ServiceUnitStateData
-
ServiceUnitStateData
public ServiceUnitStateData(ServiceUnitState state, String dstBroker, boolean force, long versionId)
-
-
Method Details
-
state
-
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 '=='. -
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. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
dstBroker
Returns the value of thedstBrokerrecord component.- Returns:
- the value of the
dstBrokerrecord component
-
sourceBroker
Returns the value of thesourceBrokerrecord component.- Returns:
- the value of the
sourceBrokerrecord component
-
splitServiceUnitToDestBroker
Returns the value of thesplitServiceUnitToDestBrokerrecord component.- Returns:
- the value of the
splitServiceUnitToDestBrokerrecord component
-
force
public boolean force()Returns the value of theforcerecord component.- Returns:
- the value of the
forcerecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
versionId
public long versionId()Returns the value of theversionIdrecord component.- Returns:
- the value of the
versionIdrecord component
-