Interface Subscription
- All Superinterfaces:
Cancelable
The
Due to the asynchronous nature of the
Subscription
is the link between the SubscriptionRequest
and the actual running Task
.
Due to the asynchronous nature of the
Task
execution a Subscription
might not immediately become
active. isActive()
provides an answer if the underlying Task
is already running.
- Since:
- 2.1
- Author:
- Christoph Strobl, Mark Paluch
-
Method Summary
Methods inherited from interface org.springframework.data.mongodb.core.messaging.Cancelable
cancel
-
Method Details
-
isActive
boolean isActive()- Returns:
- true if the subscription is currently executed.
-
await
- Parameters:
timeout
- must not be null.- Returns:
true
if the subscription was activated.false
if the waiting time elapsed before task was activated.- Throws:
InterruptedException
- if the current thread is interrupted while waiting.
-