public static interface Replica.ModificationIterator
Modifier and Type | Method and Description |
---|---|
long |
bootStrapTimeStamp() |
void |
dirtyEntries(long fromTimeStamp)
Dirties all entries with a modification time equal to
fromTimeStamp or newer. |
boolean |
hasNext() |
boolean |
nextEntry(Replica.EntryCallback callback,
int chronicleId)
A non-blocking call that provides the entry that has changed to
callback.onEntry() . |
void |
setModificationNotifier(Replica.ModificationNotifier modificationNotifier)
the
modificationNotifier is called when ever there is a change applied to the
modification iterator |
boolean hasNext()
true
if the is another entry to be received via nextEntry(Replica.EntryCallback, int chronicleId)
boolean nextEntry(@NotNull Replica.EntryCallback callback, int chronicleId) throws InterruptedException
callback.onEntry()
.callback
- a callback which will be called when a new entry becomes available.chronicleId
- only assigned when using chronicle channelstrue
if the entry was accepted by the callback.onEntry()
method,
false
if the entry was not accepted or was not availableInterruptedException
void dirtyEntries(long fromTimeStamp)
fromTimeStamp
or newer. It
means all these entries will be considered as "new" by this ModificationIterator and
iterated once again no matter if they have already been. This functionality is used to publish recently modified entries to a new remote node as it connects.
fromTimeStamp
- the timestamp from which all entries should be dirtyvoid setModificationNotifier(@NotNull Replica.ModificationNotifier modificationNotifier)
modificationNotifier
is called when ever there is a change applied to the
modification iteratormodificationNotifier
- gets notified when a change occurslong bootStrapTimeStamp()
Copyright © 2017. All rights reserved.