public class ManagedCursorContainer extends Object implements Iterable<ManagedCursor>
| Constructor and Description |
|---|
ManagedCursorContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ManagedCursor cursor) |
org.apache.commons.lang3.tuple.Pair<PositionImpl,PositionImpl> |
cursorUpdated(ManagedCursor cursor,
Position newPosition)
Signal that a cursor position has been updated and that the container must re-order the cursor list.
|
ManagedCursor |
get(String name) |
ManagedCursor |
getSlowestReader() |
PositionImpl |
getSlowestReaderPosition()
Get the slowest reader position, meaning older acknowledged position between all the cursors.
|
boolean |
hasDurableCursors()
Check whether that are any durable cursors
|
boolean |
isEmpty()
Check whether there are any cursors
|
Iterator<ManagedCursor> |
iterator() |
void |
removeCursor(String name) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic void add(ManagedCursor cursor)
public ManagedCursor get(String name)
public void removeCursor(String name)
public org.apache.commons.lang3.tuple.Pair<PositionImpl,PositionImpl> cursorUpdated(ManagedCursor cursor, Position newPosition)
cursor - public PositionImpl getSlowestReaderPosition()
public ManagedCursor getSlowestReader()
public boolean isEmpty()
public boolean hasDurableCursors()
public Iterator<ManagedCursor> iterator()
iterator in interface Iterable<ManagedCursor>Copyright © 2017–2021 Apache Software Foundation. All rights reserved.