JIVE Platform
Release 0.2.2

edu.buffalo.cse.jive.sequence
Interface MultiThreadedSequenceModel

All Superinterfaces:
Iterable<EventOccurrence>, SequenceModel

public interface MultiThreadedSequenceModel
extends SequenceModel

A SequenceModel used to represent a program execution history of a multi-threaded program. A multi-threaded sequence model differs from a sequence model in that it may contain more than one root. Each root corresponds to the root of the call tree for a thread of execution.

Iteration over the entire model by event results in event occurrences being returned in the order in which they arose amongst all threads. Therefore, event occurrences of different threads will be interleaved.

See Also:
SequenceModel, ExecutionOccurrence, EventOccurrence, MessageSend

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.buffalo.cse.jive.sequence.SequenceModel
SequenceModel.EventVisitor, SequenceModel.ExecutionVisitor, SequenceModel.Listener
 
Method Summary
 void accept(SequenceModel.ExecutionVisitor visitor, ThreadID thread)
          Processes an (@code EventVisitor} the thread of execution of the supplied ThreadID in a depth-first order.
 boolean containsThread(ThreadID thread)
          Returns whether or not the thread with the supplied ThreadID is part of the model.
 ExecutionOccurrence getRoot(ThreadID thread)
          Returns the root of the thread execution with the supplied ThreadID.
 List<ExecutionOccurrence> getRoots()
          Returns a list of all the roots contained within the model.
 List<ThreadID> getThreads()
          Returns a list of all the ThreadIDs that have threads contained in the model.
 Iterator<EventOccurrence> iterator(ThreadID thread)
          Returns an iterator which traverses the thread of execution of the supplied ThreadID in a depth-first order.
 long lastEventNumber(ThreadID thread)
          Returns the event number of the last event occurring on the supplied thread.
 
Methods inherited from interface edu.buffalo.cse.jive.sequence.SequenceModel
accept, accept, addListener, getEventOccurrence, getModelLock, getRoot, getThread, iterator, iterator, lastEventNumber, objectContext, removeListener
 

Method Detail

accept

void accept(SequenceModel.ExecutionVisitor visitor,
            ThreadID thread)
Processes an (@code EventVisitor} the thread of execution of the supplied ThreadID in a depth-first order.

Parameters:
visitor - the event visitor
thread - the desired thread to visit

iterator

Iterator<EventOccurrence> iterator(ThreadID thread)
Returns an iterator which traverses the thread of execution of the supplied ThreadID in a depth-first order.

Parameters:
thread - the thread of execution to be traversed
Returns:
an iterator over a thread in the model

containsThread

boolean containsThread(ThreadID thread)
Returns whether or not the thread with the supplied ThreadID is part of the model.

Parameters:
thread - the thread to be tested
Returns:
true if the model contains the thread, false otherwise

getThreads

List<ThreadID> getThreads()
Returns a list of all the ThreadIDs that have threads contained in the model.

Returns:
a list of the threads in the model by ThreadID

getRoot

ExecutionOccurrence getRoot(ThreadID thread)
Returns the root of the thread execution with the supplied ThreadID.

Parameters:
thread - the thread whose root should be returned
Returns:
the root of the thread execution

getRoots

List<ExecutionOccurrence> getRoots()
Returns a list of all the roots contained within the model. Each root corresponds to the root of a thread of execution.

Returns:
the roots contained within the model

lastEventNumber

long lastEventNumber(ThreadID thread)
Returns the event number of the last event occurring on the supplied thread.

Parameters:
thread - the thread whose last event number should be returned
Returns:
the last event number of the thread

JIVE Platform
Release 0.2.2