Record Class Unload
java.lang.Object
java.lang.Record
org.apache.pulsar.broker.loadbalance.extensions.models.Unload
public record Unload(String sourceBroker, String serviceUnit, Optional<String> destBroker, boolean force)
extends Record
Defines the information required to unload or transfer a service unit(e.g. bundle).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestBrokerrecord component.final 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 theserviceUnitrecord component.Returns the value of thesourceBrokerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Unload
Creates an instance of aUnloadrecord class.- Parameters:
sourceBroker- the value for thesourceBrokerrecord componentserviceUnit- the value for theserviceUnitrecord componentdestBroker- the value for thedestBrokerrecord componentforce- the value for theforcerecord component
-
Unload
-
Unload
-
-
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 '=='. -
sourceBroker
Returns the value of thesourceBrokerrecord component.- Returns:
- the value of the
sourceBrokerrecord component
-
serviceUnit
Returns the value of theserviceUnitrecord component.- Returns:
- the value of the
serviceUnitrecord component
-
destBroker
Returns the value of thedestBrokerrecord component.- Returns:
- the value of the
destBrokerrecord component
-
force
public boolean force()Returns the value of theforcerecord component.- Returns:
- the value of the
forcerecord component
-