de.grogra.xl.impl.queues
Interface Queue

All Known Subinterfaces:
TransferableQueue
All Known Implementing Classes:
GraphQueue, GraphQueueImpl, PropertyQueue, VVQueue

public interface Queue

A Queue represents a queue of tasks which is filled during the execution of an XL program. For the base implementation of the XL interfaces, when a derivation shall be performed by invocation of Graph.derive(), the execution of the queued tasks is induced by the invocation of process(int[]). Instances of Queue are obtained at run-time by the method QueueCollection.getQueue(QueueDescriptor). The returned queue is registered automatically with the QueueCollection, this ensures that its process method is invoked when all queues shall be processes. The order in which the process method is invoked for the registered queues of a QueueCollection is defined by the QueueDescriptors which were used to obtain the queues, see QueueCollection.process(int[]).

Author:
Ole Kniemeyer

Method Summary
 void clear()
          Clears the queue.
 void clearSegmentsToExclude(int[] segments)
           
 QueueDescriptor<?> getDescriptor()
          Returns the descriptor which was used to create this queue.
 void markSegment(int n)
           
 boolean process(int[] segments)
          Processes all queued tasks.
 void resetToSegment(int n)
           
 

Method Detail

clear

void clear()
Clears the queue. This is invoked by the QueueCollection in order to reuse the queue for a new transformation step.


clearSegmentsToExclude

void clearSegmentsToExclude(int[] segments)

getDescriptor

QueueDescriptor<?> getDescriptor()
Returns the descriptor which was used to create this queue.

Returns:
descriptor of this queue
See Also:
QueueCollection.getQueue(QueueDescriptor), QueueDescriptor.createQueue(QueueCollection)

markSegment

void markSegment(int n)

process

boolean process(int[] segments)
                throws RuntimeModelException
Processes all queued tasks. This method is invoked by QueueCollection.process(int[]).

Returns:
true iff the execution of tasks resulted in modifications to the Graph
Throws:
RuntimeModelException - if some error occurs during execution

resetToSegment

void resetToSegment(int n)