de.grogra.xl.impl.base
Class GraphQueueImpl

java.lang.Object
  extended by java.io.OutputStream
      extended by de.grogra.util.OutputQueue
          extended by de.grogra.util.HierarchicalQueue
              extended by de.grogra.xl.impl.base.GraphQueue
                  extended by de.grogra.xl.impl.base.GraphQueueImpl
All Implemented Interfaces:
Queue, ObjectConsumer, java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput, java.util.concurrent.Executor

public class GraphQueueImpl
extends GraphQueue
implements ObjectConsumer


Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.xl.impl.base.GraphQueue
GraphQueue.AddEdgeDescriptor, GraphQueue.AddNodeDescriptor, GraphQueue.AddUndirectedEdgeDescriptor, GraphQueue.ConnectDescriptor, GraphQueue.DeleteEdgeDescriptor, GraphQueue.DeleteNodeDescriptor, GraphQueue.ExecuteDescriptor, GraphQueue.Processor
 
Nested classes/interfaces inherited from class de.grogra.util.HierarchicalQueue
HierarchicalQueue.Cursor, HierarchicalQueue.Data, HierarchicalQueue.Reader
 
Field Summary
static int INCOMING
           
static int OUTGOING
           
 
Fields inherited from class de.grogra.xl.impl.base.GraphQueue
ADD_EDGE_DESCRIPTOR, ADD_NODE_DESCRIPTOR, ADD_UNDIRECTED_EDGE_DESCRIPTOR, CONNECT_DESCRIPTOR, DELETE_EDGE_DESCRIPTOR, DELETE_NODE_DESCRIPTOR, EXECUTE_DESCRIPTOR, FIRST_QUEUE, LAST_QUEUE
 
Fields inherited from class de.grogra.util.HierarchicalQueue
BEGIN_LEVEL, IS_FINISHED, ITEM_AND_BITS_MASK, ITEM_MASK, MAX_UNUSED_BIT, MIN_UNUSED_BIT, MIN_UNUSED_ITEM, NEXT_EXISTS, out
 
Constructor Summary
GraphQueueImpl(QueueDescriptor descr, QueueCollection qc)
           
 
Method Summary
 void addEdgeBits(java.lang.Object source, java.lang.Object target, int edges)
           
 void addNode(java.lang.Object node)
           
 void addUndirectedEdgeBits(java.lang.Object source, java.lang.Object target, int edges)
           
 void clearSegmentsToExclude(int[] segs)
           
 void connect(java.lang.Object from, java.lang.Object to, java.lang.Object param, Connector c)
           
 void connectAdjacent(java.lang.Object start, java.lang.Object end, int edges)
           
 void connectIncoming(java.lang.Object source, java.lang.Object target, Operator op)
           
 void connectOutgoing(java.lang.Object source, java.lang.Object target, Operator op)
           
 void consume(java.lang.Object v)
          Receives a value of type T.
 void copyIncoming(java.lang.Object source, java.lang.Object target, int edges)
           
 void copyIncoming(java.lang.Object source, java.lang.Object target, int edges, int copyMask, int addMask)
           
 void copyOutgoing(java.lang.Object source, java.lang.Object target, int edges)
           
 void copyOutgoing(java.lang.Object source, java.lang.Object target, int edges, int copyMask, int addMask)
           
protected  GraphQueue.Processor createProcessor()
           
 void deleteCurrentEdges(java.lang.Object node, int edges, boolean outgoing)
           
 void deleteEdgeBits(java.lang.Object source, java.lang.Object target, int edges)
           
 void deleteNode(java.lang.Object node)
           
 void embedInterpretive(java.lang.Object interpreted, java.lang.Object start, java.lang.Object end)
           
 void execute(java.lang.Runnable task)
           
protected  RuntimeModel getModel()
           
protected  TypeLoader getTypeLoader()
           
protected  int maskConnectionEdges(int edges)
           
 void moveIncoming(java.lang.Object source, java.lang.Object target, int edges)
           
 void moveOutgoing(java.lang.Object source, java.lang.Object target, int edges)
           
 boolean process(int[] segs)
          Processes all queued tasks.
 
Methods inherited from class de.grogra.xl.impl.base.GraphQueue
clear, clearSegmentsToExcludeImpl, getDescriptor, markSegment, resetToSegment
 
Methods inherited from class de.grogra.util.HierarchicalQueue
beginLevel, beginSkipBlock, cloneData, createData, discardLevel, endLevel, endSkipBlock, getCursor, getData, hasItems, hasItemsInCurrentLevel, moveTo, restore, setItemSize, writeItem, writeObject, writeObjectInStream
 
Methods inherited from class de.grogra.util.OutputQueue
close, dump, flush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeObjectInQueue, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectOutput
close, flush, write, write, write
 
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Field Detail

INCOMING

public static final int INCOMING
See Also:
Constant Field Values

OUTGOING

public static final int OUTGOING
See Also:
Constant Field Values
Constructor Detail

GraphQueueImpl

public GraphQueueImpl(QueueDescriptor descr,
                      QueueCollection qc)
Method Detail

addEdgeBits

public void addEdgeBits(java.lang.Object source,
                        java.lang.Object target,
                        int edges)
Specified by:
addEdgeBits in class GraphQueue

addNode

public void addNode(java.lang.Object node)
Specified by:
addNode in class GraphQueue

addUndirectedEdgeBits

public void addUndirectedEdgeBits(java.lang.Object source,
                                  java.lang.Object target,
                                  int edges)
Specified by:
addUndirectedEdgeBits in class GraphQueue

clearSegmentsToExclude

public void clearSegmentsToExclude(int[] segs)
Specified by:
clearSegmentsToExclude in interface Queue

connect

public void connect(java.lang.Object from,
                    java.lang.Object to,
                    java.lang.Object param,
                    Connector c)
Specified by:
connect in class GraphQueue

connectAdjacent

public void connectAdjacent(java.lang.Object start,
                            java.lang.Object end,
                            int edges)
Specified by:
connectAdjacent in class GraphQueue

connectIncoming

public void connectIncoming(java.lang.Object source,
                            java.lang.Object target,
                            Operator op)
Specified by:
connectIncoming in class GraphQueue

connectOutgoing

public void connectOutgoing(java.lang.Object source,
                            java.lang.Object target,
                            Operator op)
Specified by:
connectOutgoing in class GraphQueue

consume

public void consume(java.lang.Object v)
Description copied from interface: ObjectConsumer
Receives a value of type T.

Specified by:
consume in interface ObjectConsumer

copyIncoming

public void copyIncoming(java.lang.Object source,
                         java.lang.Object target,
                         int edges)
Specified by:
copyIncoming in class GraphQueue

copyIncoming

public void copyIncoming(java.lang.Object source,
                         java.lang.Object target,
                         int edges,
                         int copyMask,
                         int addMask)
Specified by:
copyIncoming in class GraphQueue

copyOutgoing

public void copyOutgoing(java.lang.Object source,
                         java.lang.Object target,
                         int edges)
Specified by:
copyOutgoing in class GraphQueue

copyOutgoing

public void copyOutgoing(java.lang.Object source,
                         java.lang.Object target,
                         int edges,
                         int copyMask,
                         int addMask)
Specified by:
copyOutgoing in class GraphQueue

createProcessor

protected GraphQueue.Processor createProcessor()
Specified by:
createProcessor in class GraphQueue

deleteCurrentEdges

public void deleteCurrentEdges(java.lang.Object node,
                               int edges,
                               boolean outgoing)
Specified by:
deleteCurrentEdges in class GraphQueue

deleteEdgeBits

public void deleteEdgeBits(java.lang.Object source,
                           java.lang.Object target,
                           int edges)
Specified by:
deleteEdgeBits in class GraphQueue

deleteNode

public void deleteNode(java.lang.Object node)
Specified by:
deleteNode in class GraphQueue

embedInterpretive

public void embedInterpretive(java.lang.Object interpreted,
                              java.lang.Object start,
                              java.lang.Object end)
Specified by:
embedInterpretive in class GraphQueue

execute

public void execute(java.lang.Runnable task)
Specified by:
execute in interface java.util.concurrent.Executor

getModel

protected RuntimeModel getModel()
Specified by:
getModel in class GraphQueue

getTypeLoader

protected TypeLoader getTypeLoader()

maskConnectionEdges

protected int maskConnectionEdges(int edges)

moveIncoming

public void moveIncoming(java.lang.Object source,
                         java.lang.Object target,
                         int edges)
Specified by:
moveIncoming in class GraphQueue

moveOutgoing

public void moveOutgoing(java.lang.Object source,
                         java.lang.Object target,
                         int edges)
Specified by:
moveOutgoing in class GraphQueue

process

public boolean process(int[] segs)
                throws RuntimeModelException
Description copied from interface: Queue
Processes all queued tasks. This method is invoked by QueueCollection.process(int[]).

Specified by:
process in interface Queue
Overrides:
process in class GraphQueue
Returns:
true iff the execution of tasks resulted in modifications to the Graph
Throws:
RuntimeModelException - if some error occurs during execution