Interface Task
- All Superinterfaces:
- Cancelable,- Runnable,- SchedulingAwareRunnable
The actual 
Task to run within the StreamMessageListenerContainer.- Since:
- 2.2
- Author:
- Mark Paluch
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumTheTask.Statedefining the lifecycle phase the actualTask.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanawaitStart(Duration timeout) Synchronous, blocking call that awaits until thisTaskbecomes active.getState()Get the current lifecycle phase.default booleanisActive()Methods inherited from interface org.springframework.data.redis.stream.CancelablecancelMethods inherited from interface org.springframework.scheduling.SchedulingAwareRunnablegetQualifier, isLongLived
- 
Method Details- 
isActivedefault boolean isActive()- Returns:
- true if the task is currently running.
 
- 
getStateTask.State getState()Get the current lifecycle phase.- Returns:
- never null.
 
- 
awaitStartSynchronous, blocking call that awaits until thisTaskbecomes active. Start awaiting is rearmed aftercancellingto support restart.- Parameters:
- timeout- must not be null.
- Returns:
- trueif the task was started.- falseif the waiting time elapsed before task was started.
- Throws:
- InterruptedException- if the current thread is interrupted while waiting.
 
 
-