Record Class LauncherEvent.DataUpdateAvailable
java.lang.Object
java.lang.Record
com.botwithus.bot.api.script.LauncherEvent.DataUpdateAvailable
- Record Components:
phase- where the update isstagedSha- the update waiting to be applied, if anyhostsBlocking- how many hosts must close before it appliesapplyWhenHostsClose- whether it applies by itself once they do
- All Implemented Interfaces:
LauncherEvent
- Enclosing interface:
LauncherEvent
public static record LauncherEvent.DataUpdateAvailable(LauncherEvent.DataPhase phase, Optional<String> stagedSha, int hostsBlocking, boolean applyWhenHostsClose)
extends Record
implements LauncherEvent
The state of a data update changed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface LauncherEvent
LauncherEvent.AgentUpdated, LauncherEvent.ClientExited, LauncherEvent.ClientStarted, LauncherEvent.ClientStateChanged, LauncherEvent.DataPhase, LauncherEvent.DataUpdateApplied, LauncherEvent.DataUpdateAvailable, LauncherEvent.EventsDropped, LauncherEvent.ExitReason, LauncherEvent.LicenceChanged, LauncherEvent.ServiceLost, LauncherEvent.ServiceRestored, LauncherEvent.ServiceShuttingDown -
Constructor Summary
ConstructorsConstructorDescriptionDataUpdateAvailable(LauncherEvent.DataPhase phase, Optional<String> stagedSha, int hostsBlocking, boolean applyWhenHostsClose) Creates an instance of aDataUpdateAvailablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theapplyWhenHostsCloserecord component.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 thehostsBlockingrecord component.phase()Returns the value of thephaserecord component.Returns the value of thestagedSharecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataUpdateAvailable
public DataUpdateAvailable(LauncherEvent.DataPhase phase, Optional<String> stagedSha, int hostsBlocking, boolean applyWhenHostsClose) Creates an instance of aDataUpdateAvailablerecord class.- Parameters:
phase- the value for thephaserecord componentstagedSha- the value for thestagedSharecord componenthostsBlocking- the value for thehostsBlockingrecord componentapplyWhenHostsClose- the value for theapplyWhenHostsCloserecord component
-
-
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. -
phase
-
stagedSha
-
hostsBlocking
public int hostsBlocking()Returns the value of thehostsBlockingrecord component.- Returns:
- the value of the
hostsBlockingrecord component
-
applyWhenHostsClose
public boolean applyWhenHostsClose()Returns the value of theapplyWhenHostsCloserecord component.- Returns:
- the value of the
applyWhenHostsCloserecord component
-