public class SnapshotableStreamEventQueue extends Object implements Iterator<StreamEvent>, Serializable
Modifier and Type | Field and Description |
---|---|
protected StreamEvent |
first |
protected StreamEvent |
last |
protected StreamEvent |
lastReturned |
protected StreamEvent |
previousToLastReturned |
Constructor and Description |
---|
SnapshotableStreamEventQueue(StreamEventClonerHolder eventClonerHolder) |
SnapshotableStreamEventQueue(StreamEventClonerHolder eventClonerHolder,
int operationChangeLogThreshold) |
Modifier and Type | Method and Description |
---|---|
void |
add(StreamEvent events) |
void |
clear() |
boolean |
equals(Object o) |
StreamEvent |
getFirst() |
StreamEvent |
getLast() |
Snapshot |
getSnapshot() |
int |
hashCode() |
boolean |
hasNext()
Returns true if the iteration has more elements.
|
StreamEvent |
next()
Returns the next element in the iteration.
|
void |
overwrite(StreamEvent streamEvent) |
StreamEvent |
poll() |
void |
remove()
Removes from the underlying collection the last element returned by the
iterator (optional operation).
|
void |
reset() |
void |
restore(SnapshotStateList snapshotStatelist) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEachRemaining
protected StreamEvent first
protected StreamEvent previousToLastReturned
protected StreamEvent lastReturned
protected StreamEvent last
public SnapshotableStreamEventQueue(StreamEventClonerHolder eventClonerHolder)
public SnapshotableStreamEventQueue(StreamEventClonerHolder eventClonerHolder, int operationChangeLogThreshold)
public void add(StreamEvent events)
public void remove()
remove
in interface Iterator<StreamEvent>
UnsupportedOperationException
- if the remove
operation is not supported by this Iterator.IllegalStateException
- if the next method has not
yet been called, or the remove method has already
been called after the last call to the next
method.public boolean hasNext()
hasNext
in interface Iterator<StreamEvent>
public StreamEvent next()
next
in interface Iterator<StreamEvent>
NoSuchElementException
- iteration has no more elements.public void clear()
public void reset()
public StreamEvent getFirst()
public StreamEvent getLast()
public StreamEvent poll()
public Snapshot getSnapshot()
public void restore(SnapshotStateList snapshotStatelist)
public void overwrite(StreamEvent streamEvent)
Copyright © 2019. All rights reserved.