|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.xqhs.util.config.Config
net.xqhs.util.logging.Unit
net.xqhs.graphs.graph.SimpleGraph
net.xqhs.graphs.matchingPlatform.TrackingGraph
net.xqhs.graphs.matchingPlatform.GMPImplementation.PrincipalGraph
net.xqhs.graphs.context.ContextGraph
public class ContextGraph
Nested Class Summary | |
---|---|
static class |
ContextGraph.ContextEdge
|
Nested classes/interfaces inherited from class net.xqhs.graphs.matchingPlatform.TrackingGraph |
---|
TrackingGraph.Operation, TrackingGraph.Transaction |
Nested classes/interfaces inherited from class net.xqhs.graphs.graph.SimpleGraph |
---|
SimpleGraph.NodeData |
Nested classes/interfaces inherited from class net.xqhs.util.config.Config |
---|
net.xqhs.util.config.Config.ConfigLockedException |
Field Summary | |
---|---|
(package private) CCMImplementation |
parent
|
(package private) Instant.TimeKeeper |
theTime
|
(package private) java.util.PriorityQueue<java.util.Map.Entry<Instant,ContextGraph.ContextEdge>> |
validityQueue
|
Fields inherited from class net.xqhs.graphs.matchingPlatform.TrackingGraph |
---|
history, isShadow, keepHistory, sequence, shadowQueues, transactionQueue |
Fields inherited from class net.xqhs.graphs.graph.SimpleGraph |
---|
EDGE_LINE, EDGE_SEPARATOR, EDGE_TARGET, edges, nodes |
Fields inherited from class net.xqhs.util.logging.Unit |
---|
DEFAULT_LEVEL, DEFAULT_UNIT_NAME |
Constructor Summary | |
---|---|
ContextGraph(CCMImplementation platform)
|
|
ContextGraph(CCMImplementation platform,
java.util.Queue<TrackingGraph.Transaction> transactionsLink,
int initialSequence,
ContextGraph initialGraph)
|
Method Summary | |
---|---|
protected void |
addTransaction(TrackingGraph.Transaction t)
Handles adding of new transactions to the history and to shadow graphs queues. |
ContextGraph |
createShadowGraph()
Creates a new shadow graph of this graph, based on the current state of the graph. |
protected ContextGraph |
performOperation(GraphComponent component,
TrackingGraph.Operation operation,
boolean externalCall)
Internal method for performing one operation upon the current state of the graph. |
protected ContextGraph |
setTimeKeeper(Instant.TimeKeeper time)
|
void |
tick(Instant.TimeKeeper ticker,
Instant now)
|
Methods inherited from class net.xqhs.graphs.matchingPlatform.TrackingGraph |
---|
add, addAll, applyTransaction, applyTransactionInternal, canIncrement, createShadow, createShadowQueue, getNextSequenceOperations, getSequence, incrementSequence, incrementSequence, incrementSequenceFastForward, incrementSequenceInternal, isShadow, keepHistory, readFrom, remove, removeAll, toString, toString, toStringBasic |
Methods inherited from class net.xqhs.graphs.graph.SimpleGraph |
---|
addEdge, addNode, computeDistancesFromUndirected, contains, getComponents, getEdges, getInEdges, getNodes, getNodesNamed, getOutEdges, getUnitName, m, n, removeEdge, removeNode, size, toDot |
Methods inherited from class net.xqhs.util.logging.Unit |
---|
compose, dbg, doExit, getDefaultUnitName, l, le, lf, li, lock, lockedR, lr, lr, lw, setLink, setLink, setLogDisplay, setLogEnsureNew, setLoggerClass, setLoggerType, setLoggerTypeClass, setLogLevel, setLogReporter, setUnitName, setUnitName |
Methods inherited from class net.xqhs.util.config.Config |
---|
build, ensureLocked, locked, lockedEx, makeDefaults |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.xqhs.graphs.matchingPlatform.GraphMatchingPlatform.PlatformPrincipalGraph |
---|
getSequence |
Methods inherited from interface net.xqhs.graphs.matchingPlatform.GraphMatchingPlatform.PlatformShadowGraph |
---|
canIncrement, getNextSequenceOperations, getSequence, incrementSequence, incrementSequence, incrementSequenceFastForward |
Methods inherited from interface net.xqhs.graphs.graph.Graph |
---|
add, addAll, addEdge, addNode, contains, getComponents, getEdges, getInEdges, getNodes, getNodesNamed, getOutEdges, m, n, remove, removeAll, removeEdge, removeNode, size |
Field Detail |
---|
Instant.TimeKeeper theTime
CCMImplementation parent
java.util.PriorityQueue<java.util.Map.Entry<Instant,ContextGraph.ContextEdge>> validityQueue
Constructor Detail |
---|
public ContextGraph(CCMImplementation platform)
public ContextGraph(CCMImplementation platform, java.util.Queue<TrackingGraph.Transaction> transactionsLink, int initialSequence, ContextGraph initialGraph)
Method Detail |
---|
public ContextGraph createShadowGraph()
GraphMatchingPlatform.PlatformPrincipalGraph
createShadowGraph
in interface GraphMatchingPlatform.PlatformPrincipalGraph
createShadowGraph
in class GMPImplementation.PrincipalGraph
protected ContextGraph setTimeKeeper(Instant.TimeKeeper time)
protected ContextGraph performOperation(GraphComponent component, TrackingGraph.Operation operation, boolean externalCall)
TrackingGraph
If externalCall
is true
, the method also creates a new transaction with the operation
and adds it to shadow queues and to the history. Otherwise, these operations are handled elsewhere.
This method should be overridden by any extending classes needing to do anything with the newly added components. If it is the case, the overriding method should also check if they should throw the exception.
performOperation
in class TrackingGraph
component
- - the component contained in the operation.operation
- - the operation to perform.externalCall
- - true
if the method is called by an add or remove method, and the transaction should be
added.
protected void addTransaction(TrackingGraph.Transaction t)
TrackingGraph
addTransaction
in class TrackingGraph
t
- - the transaction to add.public void tick(Instant.TimeKeeper ticker, Instant now)
tick
in interface Instant.TickReceiver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |