public interface Task extends SchedulingAwareRunnable, Cancelable
Task
to run within the StreamMessageListenerContainer
.Modifier and Type | Interface and Description |
---|---|
static class |
Task.State
The
Task.State defining the lifecycle phase the actual Task . |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitStart(Duration timeout)
Synchronous, blocking call that awaits until this
Task becomes active. |
Task.State |
getState()
Get the current lifecycle phase.
|
default boolean |
isActive() |
isLongLived
cancel
default boolean isActive()
running
.Task.State getState()
boolean awaitStart(Duration timeout) throws InterruptedException
Task
becomes active. Start awaiting is
rearmed after cancelling
to support restart.timeout
- must not be null.true
if the task was started. false
if the waiting time elapsed before task was started.InterruptedException
- if the current thread is interrupted while waiting.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.