Interface Replayable

All Known Implementing Classes:
AbstractGraph, AdjacencyListGraph, DefaultGraph, MultiGraph, SingleGraph, Timeline

public interface Replayable
Defines sources that can be replayed. This is usefull when you are connecting a sink to a source but you need to get informations about the current state of the dynamic graph.

 Replayable source = ... ;
 Replayable.Controller replay = source.getReplayController();
 ...
 // source is building a graph
 ...
 Graph g = ... ;
 //
 // Replay the source to get the current state of the graph
 //
 replay.addSink(g);
 replay.replay();
 
  • Method Details

    • getReplayController

      Replayable.Controller getReplayController()
      Get a controller to replay the graph.
      Returns:
      a new replay controller
    • replay

      static void replay​(Replayable source, Sink sink)
      Util method to replay a replayable source into a sink.
      Parameters:
      source - a source implementing the Replayable interface
      sink - sink which will receive the events produced by the replay
    • tryReplay

      static void tryReplay​(Source source, Sink sink)
      Same as replay(Replayable, Sink) but the first parameter is just a Source and it will be replayed only if the Replayable interface is implemented.
      Parameters:
      source - a source
      sink - sink which will receive the events produced by the replay