Class SegmentNotifier
- java.lang.Object
-
- io.pravega.client.stream.notifications.notifier.AbstractNotifier<T>
-
- io.pravega.client.stream.notifications.notifier.AbstractPollingNotifier<SegmentNotification>
-
- io.pravega.client.stream.notifications.notifier.SegmentNotifier
-
- All Implemented Interfaces:
Observable<SegmentNotification>
public class SegmentNotifier extends AbstractPollingNotifier<SegmentNotification>
-
-
Field Summary
-
Fields inherited from class io.pravega.client.stream.notifications.notifier.AbstractNotifier
executor, notifySystem
-
-
Constructor Summary
Constructors Constructor Description SegmentNotifier(NotificationSystem notifySystem, StateSynchronizer<io.pravega.client.stream.impl.ReaderGroupState> synchronizer, java.util.concurrent.ScheduledExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getType()
Get the notification type.void
pollNow()
Invokes the periodic processing now in the current thread.void
registerListener(Listener<SegmentNotification> listener)
Register listener for notification type T.-
Methods inherited from class io.pravega.client.stream.notifications.notifier.AbstractPollingNotifier
unregisterAllListeners, unregisterListener
-
-
-
-
Constructor Detail
-
SegmentNotifier
public SegmentNotifier(NotificationSystem notifySystem, StateSynchronizer<io.pravega.client.stream.impl.ReaderGroupState> synchronizer, java.util.concurrent.ScheduledExecutorService executor)
-
-
Method Detail
-
pollNow
public void pollNow()
Invokes the periodic processing now in the current thread.
-
registerListener
public void registerListener(Listener<SegmentNotification> listener)
Description copied from interface:Observable
Register listener for notification type T. Multiple listeners can be added for the same type.- Specified by:
registerListener
in interfaceObservable<SegmentNotification>
- Overrides:
registerListener
in classAbstractNotifier<SegmentNotification>
- Parameters:
listener
- This is the listener which will be invoked incase of an Notification.
-
getType
public java.lang.String getType()
Description copied from interface:Observable
Get the notification type.- Returns:
- Notification type.
-
-