@InterfaceStability.Evolving public interface ApplicationRunner
SamzaApplication
at runtime.
Implementation Notes: implementation of ApplicationRunner
must have a public default constructor
#ApplicationRunner(SamzaApplication, Config)
Modifier and Type | Method and Description |
---|---|
void |
kill()
Kill the Samza jobs represented by
SamzaApplication
It is non-blocking so it doesn't wait for the application stopping. |
default void |
run()
This is like
run(ExternalContext) , except it provides a null ExternalContext . |
void |
run(ExternalContext externalContext)
Deploy and run the Samza jobs to execute
SamzaApplication . |
ApplicationStatus |
status()
Get the collective status of the Samza jobs represented by
SamzaApplication . |
void |
waitForFinish()
Waits until the application finishes.
|
boolean |
waitForFinish(java.time.Duration timeout)
Waits for
timeout duration for the application to finish. |
default void run()
run(ExternalContext)
, except it provides a null ExternalContext
.void run(ExternalContext externalContext)
SamzaApplication
.
It is non-blocking so it doesn't wait for the application running.externalContext
- nullable ExternalContext
to pass through to the applicationvoid kill()
SamzaApplication
It is non-blocking so it doesn't wait for the application stopping.ApplicationStatus status()
SamzaApplication
.
Returns ApplicationStatus
object.SamzaApplication
void waitForFinish()
boolean waitForFinish(java.time.Duration timeout)
timeout
duration for the application to finish.timeout
- time to wait for the application to finish