Package org.factcast.core.subscription
Interface Subscription
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ReconnectingFactSubscriptionWrapper
,SubscriptionImpl
public interface Subscription extends AutoCloseable
- Author:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Subscription
awaitCatchup()
blocks until Catchup or Cancelled event receivedSubscription
awaitCatchup(long waitTimeInMillis)
blocks until Catchup or Cancelled event receivedSubscription
awaitComplete()
blocks until Complete or Cancelled event receivedSubscription
awaitComplete(long waitTimeInMillis)
blocks until Complete or Cancelled event received-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
awaitCatchup
Subscription awaitCatchup() throws SubscriptionCancelledException
blocks until Catchup or Cancelled event received- Returns:
- this for fluency
- Throws:
SubscriptionCancelledException
- if Subscription was cancelled before or during the wait
-
awaitCatchup
Subscription awaitCatchup(long waitTimeInMillis) throws SubscriptionCancelledException, TimeoutException
blocks until Catchup or Cancelled event received- Parameters:
waitTimeInMillis
-- Returns:
- this for fluency
- Throws:
SubscriptionCancelledException
TimeoutException
- if no relevant event was received in time
-
awaitComplete
Subscription awaitComplete() throws SubscriptionCancelledException
blocks until Complete or Cancelled event received- Returns:
- Throws:
SubscriptionCancelledException
-
awaitComplete
Subscription awaitComplete(long waitTimeInMillis) throws SubscriptionCancelledException, TimeoutException
blocks until Complete or Cancelled event received- Parameters:
waitTimeInMillis
-- Returns:
- this
- Throws:
SubscriptionCancelledException
TimeoutException
- if no relevant event was received in time
-
-