water.util
Class TimelineSnapshot
java.lang.Object
water.util.TimelineSnapshot
- All Implemented Interfaces:
- java.lang.Iterable<TimelineSnapshot.Event>, java.util.Iterator<TimelineSnapshot.Event>
public final class TimelineSnapshot
- extends java.lang.Object
- implements java.lang.Iterable<TimelineSnapshot.Event>, java.util.Iterator<TimelineSnapshot.Event>
Wrapper around timeline snapshot. Implements iterator interface (events are
ordered according to send/receive dependencies across the nodes and trivial time
dependencies inside node)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_sends
public final java.util.HashMap<TimelineSnapshot.Event,java.util.ArrayList<TimelineSnapshot.Event>> _sends
TimelineSnapshot
public TimelineSnapshot(H2O cloud,
long[][] snapshot)
iterator
public java.util.Iterator<TimelineSnapshot.Event> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<TimelineSnapshot.Event>
hasNext
public boolean hasNext()
- Just check if there is any non null non-issued event.
- Specified by:
hasNext
in interface java.util.Iterator<TimelineSnapshot.Event>
getDependency
public TimelineSnapshot.Event getDependency(TimelineSnapshot.Event e)
next
public TimelineSnapshot.Event next()
- Get the next event of the timeline according to the ordering. Ordering is
performed in this method. Basically there are n ordered stream of events
with possible dependenencies caused by send/rcv relation.
Sends are always eligible to be scheduled. Receives are eligible only if
their matching send was already issued. In situation when current events of
all streams are blocked (should not happen!) the oldest one is unblocked
and issued.
Out of all eligible events, the smallest one (according to Event.compareTo)
is picked.
- Specified by:
next
in interface java.util.Iterator<TimelineSnapshot.Event>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<TimelineSnapshot.Event>