Record Class StageEvent.Shutdown
java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.gateway.stages.StageEvent.Shutdown
- Record Components:
future
- Completed once all previous events have been processed.
- All Implemented Interfaces:
StageEvent
- Enclosing interface:
- StageEvent
public static record StageEvent.Shutdown(CompletableFuture<EventResult> future)
extends Record
implements StageEvent
Signals an
EventStream
has been shut down. All events will be flushed/processed before Shutdown
completes.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.eventstream.gateway.stages.StageEvent
StageEvent.Shutdown, StageEvent.Submit
-
Constructor Summary
ConstructorsConstructorDescriptionShutdown
(CompletableFuture<EventResult> future) Creates an instance of aShutdown
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete
(EventResult result) Must be called byStage
when it's done being processed byEventStream
.static StageEvent.Shutdown
create()
final boolean
Indicates whether some other object is "equal to" this one.future()
Returns the value of thefuture
record component.final int
hashCode()
Returns a hash code value for this object.split
(int count) Splits an Event into multiple copies of the same Event.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.eventstream.gateway.stages.StageEvent
getResult
-
Constructor Details
-
Shutdown
Creates an instance of aShutdown
record class.- Parameters:
future
- the value for thefuture
record component
-
-
Method Details
-
create
-
complete
Description copied from interface:StageEvent
Must be called byStage
when it's done being processed byEventStream
.- Specified by:
complete
in interfaceStageEvent
- Parameters:
result
- True, Event was successfully handled. False, otherwise.
-
split
Description copied from interface:StageEvent
Splits an Event into multiple copies of the same Event. The originating Event will only complete once all of its copies have completed. Used when multiple stages need their own copy of events.- Specified by:
split
in interfaceStageEvent
- Parameters:
count
- Amount of events to split into- Returns:
- List of cloned Events
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
future
Returns the value of thefuture
record component.- Specified by:
future
in interfaceStageEvent
- Returns:
- the value of the
future
record component
-