public interface DpNotifReplayCallback
The DpNotifReplayCallback.getLogStartTime(DpNotifStream)
and
DpNotifReplayCallback.getLogAgedTime(DpNotifStream)
callbacks is called by ConfD/NCS to
find out
a) the creation time of the current log and
b) the event time of the last notification aged out of the log, if any.
The replay() callback is called by ConfD/NCS to request replay. The stream argument must be used by the application when sending the replay notifications.
The times given by "start" and "stop" specify the extent of the replay. The start time will always be given and specify a time in the past, however the stop time may be either in the past or in the future or even omitted, i.e. the stop argument is 'null'. This means that the subscriber has requested that the subscription continues indefinitely with the live feed when the logged notifications have been sent.
If the stop time is given:
The application sends all logged notifications that have an event time later than the start time but not later than the stop time. Note that if the stop time is in the future when the replay request arrives, this includes notifications logged while the replay is in progress (if any), as long as their event time is not later than the stop time.
If the stop time is not given:
The application sends all logged notifications that have an event time later than the start time. Note that this includes notifications logged after the request was received (if any).
ConfD/NCS will if needed switch the subscriber over to the live feed and then end the subscription when the stop time is reached. The callback may analyze the start and stop arguments to determine start and stop positions in the log.
DpNotifStream
Modifier and Type | Method and Description |
---|---|
ConfDatetime |
getLogAgedTime(DpNotifStream stream)
The callback is called by ConfD/NCS to find out the event time of the
last notification aged out of the log, if any.
|
ConfDatetime |
getLogStartTime(DpNotifStream stream)
The callback is called by ConfD/NCS to find out the log's current start
time, relevant for replay requests.
|
void |
replay(DpNotifStream stream,
ConfDatetime start,
ConfDatetime stop)
The replay() callback is called by ConfD/NCS to request replay.
|
ConfDatetime getLogStartTime(DpNotifStream stream) throws DpCallbackException
DpCallbackException
- Callback method failed.ConfDatetime getLogAgedTime(DpNotifStream stream) throws DpCallbackException
DpCallbackException
- Callback method failed.void replay(DpNotifStream stream, ConfDatetime start, ConfDatetime stop) throws DpCallbackException
DpCallbackException