de.grogra.xl.impl.base
public abstract class Producer extends java.lang.Object implements Producer, java.util.concurrent.Executor
Producer.
It uses subclasses of GraphQueue to represent the queues which
store deferred actions of XL.| Modifier and Type | Field and Description |
|---|---|
protected GraphQueue |
addNodeQueue |
protected GraphQueue |
deleteEdgeQueue |
protected GraphQueue |
deleteNodeQueue |
DOUBLE_ARROW, EXECUTION_ARROW, SIMPLE_ARROW| Modifier | Constructor and Description |
|---|---|
protected |
Producer(QueryState match) |
protected |
Producer(RuntimeModel model) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEdgeImpl(java.lang.Object first,
java.lang.Object second,
int bits,
EdgeDirection direction) |
protected void |
addNodeImpl(java.lang.Object node,
boolean addEdge) |
protected void |
addNodeImplMS(java.lang.Object node,
boolean addEdge) |
<N,P> void |
connect(N s,
N t,
P param,
Connector<N,P> c)
Adds an action to the connecting queue
q
(GraphQueue.CONNECT_DESCRIPTOR) which induces the invocation
c.connect(s, t, param, q) on queue application. |
void |
consume(java.lang.Object node) |
void |
copyIncoming(java.lang.Object s,
java.lang.Object t,
int edges) |
void |
copyOutgoing(java.lang.Object s,
java.lang.Object t,
int edges) |
void |
cut() |
void |
execute(java.lang.Runnable r) |
FirstLastScale |
getFirstLastScale(int index) |
FirstLastScale |
getFirstLastScale(java.lang.Object node)
Returns an existing FirstLastScale for the scale of the input node
|
protected java.lang.Object |
getPreviousNode() |
protected QueryState |
getQueryState()
Returns the match for which this producer constructs the
replacement.
|
<Q extends Queue> |
getQueue(QueueDescriptor<Q> descr) |
QueueCollection |
getQueues() |
void |
interpretive() |
void |
moveIncoming(java.lang.Object s,
java.lang.Object t,
int edges) |
void |
moveOutgoing(java.lang.Object s,
java.lang.Object t,
int edges) |
protected void |
nodeUsed(java.lang.Object object) |
protected void |
popImpl() |
boolean |
producer$beginExecution(int arrow)
This method is invoked by the XL run-time system in order to notify the
producer about the beginning of a right-hand side (i.e., a match for the left-hand side
has been found, and the right-hand side is executed).
|
java.lang.Object |
producer$cliqueBegin() |
java.lang.Object |
producer$cliqueEnd() |
void |
producer$endExecution(boolean applied)
This method is invoked by the XL run-time system in order to notify the
producer about the end of the execution of a right-hand side.
|
Graph |
producer$getGraph()
Returns the graph for which this producer constructs the
right-hand side structur.
|
void |
producer$visitEdge(EdgePattern pattern) |
protected void |
pushImpl() |
protected void |
separateImpl() |
void |
setConnectionEdges(int edges) |
void |
setInConnectionEdges(int edges) |
void |
setOutConnectionEdges(int edges) |
void |
useOperators(boolean value) |
protected GraphQueue addNodeQueue
protected GraphQueue deleteEdgeQueue
protected GraphQueue deleteNodeQueue
protected Producer(QueryState match)
protected Producer(RuntimeModel model)
protected final void addEdgeImpl(java.lang.Object first,
java.lang.Object second,
int bits,
EdgeDirection direction)
protected void addNodeImpl(java.lang.Object node,
boolean addEdge)
protected void addNodeImplMS(java.lang.Object node,
boolean addEdge)
public <N,P> void connect(N s,
N t,
P param,
Connector<N,P> c)
q
(GraphQueue.CONNECT_DESCRIPTOR) which induces the invocation
c.connect(s, t, param, q) on queue application.s - node of the match for the left hand side of the rulet - replacing node of the right hand side of the ruleparam - some parameter for the connectorc - a connectorpublic void consume(java.lang.Object node)
public void copyIncoming(java.lang.Object s,
java.lang.Object t,
int edges)
public void copyOutgoing(java.lang.Object s,
java.lang.Object t,
int edges)
public void cut()
public void execute(java.lang.Runnable r)
execute in interface java.util.concurrent.Executorpublic FirstLastScale getFirstLastScale(int index)
public FirstLastScale getFirstLastScale(java.lang.Object node)
node - protected java.lang.Object getPreviousNode()
protected QueryState getQueryState()
Graph.createProducer(de.grogra.xl.query.QueryState) which
created this producer.public <Q extends Queue> Q getQueue(QueueDescriptor<Q> descr)
public QueueCollection getQueues()
public void interpretive()
public void moveIncoming(java.lang.Object s,
java.lang.Object t,
int edges)
public void moveOutgoing(java.lang.Object s,
java.lang.Object t,
int edges)
protected void nodeUsed(java.lang.Object object)
protected void popImpl()
public boolean producer$beginExecution(int arrow)
Producerproducer$beginExecution in interface Producerarrow - the type of rule arrow, one of Producer.SIMPLE_ARROW,
Producer.DOUBLE_ARROW, Producer.EXECUTION_ARROWtrue if the right-hand side shall be executed,
false if its execution shall be skippedpublic java.lang.Object producer$cliqueBegin()
public java.lang.Object producer$cliqueEnd()
public void producer$endExecution(boolean applied)
Producerproducer$endExecution in interface Producerapplied - return value of invocation of
Producer.producer$beginExecution(int)public Graph producer$getGraph()
Producerproducer$getGraph in interface Producerpublic void producer$visitEdge(EdgePattern pattern)
producer$visitEdge in interface Producerprotected void pushImpl()
protected void separateImpl()
public void setConnectionEdges(int edges)
public void setInConnectionEdges(int edges)
public void setOutConnectionEdges(int edges)
public void useOperators(boolean value)