|
||||||||||
| 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.context.CCMImplementation
public class CCMImplementation
| Nested Class Summary | |
|---|---|
(package private) class |
CCMImplementation.MatchNotificationTarget
|
| Nested classes/interfaces inherited from class net.xqhs.util.config.Config |
|---|
net.xqhs.util.config.Config.ConfigLockedException |
| Nested classes/interfaces inherited from interface net.xqhs.graphs.context.ContinuousMatchingProcess |
|---|
ContinuousMatchingProcess.MatchNotificationReceiver |
| Field Summary | |
|---|---|
(package private) boolean |
continuousMatching
|
(package private) GraphMatchingPlatform |
matchingPlatform
|
(package private) java.util.Map<ContextPattern,java.util.Set<CCMImplementation.MatchNotificationTarget>> |
notificationTargets
|
(package private) Instant.TimeKeeper |
theTime
|
| Fields inherited from class net.xqhs.util.logging.Unit |
|---|
DEFAULT_LEVEL, DEFAULT_UNIT_NAME |
| Constructor Summary | |
|---|---|
CCMImplementation(Instant.TimeKeeper time,
MonitorPack monitorLink)
|
|
| Method Summary | |
|---|---|
CCMImplementation |
addContextPattern(ContextPattern pattern)
Adds a context pattern to the set of context patterns, if not already existing. |
CCMImplementation |
addMatchNotificationTarget(ContextPattern pattern,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Adds a notification target for matches of the specified pattern. |
CCMImplementation |
addMatchNotificationTarget(int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Registers a ContinuousMatchingProcess.MatchNotificationReceiver as target for notifications for new matches below or with a
specified k (see Match. |
protected void |
getMatching()
|
boolean |
isContinuouslyMatching()
|
protected void |
notifyContextChange()
|
CCMImplementation |
removeContextPattern(ContextPattern pattern)
Removes a pattern from the platform. |
ContinuousMatchingProcess |
removeMatchNotificationTarget(ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Removes all registrations of the specified ContinuousMatchingProcess.MatchNotificationReceiver. |
CCMImplementation |
setContextGraph(ContextGraph graph)
Assigns a new context graph to this implementation. |
CCMImplementation |
startContinuousMatching()
Instructs the process to start or to resume (from the state in which it was stopped). |
ContinuousMatchingProcess |
startMatchingAgainstAllPatterns(Graph graph,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Creates a new ContinuousMatchingProcess, unrelated to the platform except for the set of patterns, to
match all patterns against the specified Graph instance. |
ContinuousMatchingProcess |
startMatchingAgainstGraph(Graph pattern,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Creates a new ContinuousMatchingProcess, unrelated to the platform except for the current sequence of the
Context Graph (not the matching sequence), that matches the context graph against the specified pattern. |
CCMImplementation |
stopContinuousMatching()
Instructs the process to stop. |
| Methods inherited from class net.xqhs.util.logging.Unit |
|---|
compose, dbg, doExit, getDefaultUnitName, getUnitName, 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, toString, wait, wait, wait |
| Field Detail |
|---|
Instant.TimeKeeper theTime
GraphMatchingPlatform matchingPlatform
boolean continuousMatching
java.util.Map<ContextPattern,java.util.Set<CCMImplementation.MatchNotificationTarget>> notificationTargets
| Constructor Detail |
|---|
public CCMImplementation(Instant.TimeKeeper time,
MonitorPack monitorLink)
| Method Detail |
|---|
public CCMImplementation setContextGraph(ContextGraph graph)
ContinuousContextMatchingPlatformThe platform will begin matching the current set of patterns to the new graph immediately.
setContextGraph in interface ContinuousContextMatchingPlatformgraph - - the ContextGraph.
public CCMImplementation addContextPattern(ContextPattern pattern)
ContinuousContextMatchingPlatform
The pattern will not allow modifications after this method is called (it will be Config.locked().
Matching against the pattern will begin immediately.
addContextPattern in interface ContinuousContextMatchingPlatformpattern - - the GraphPattern to add.
public CCMImplementation removeContextPattern(ContextPattern pattern)
ContinuousContextMatchingPlatform
removeContextPattern in interface ContinuousContextMatchingPlatformpattern - - the ContextPattern to remove.
public CCMImplementation addMatchNotificationTarget(int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousMatchingProcessContinuousMatchingProcess.MatchNotificationReceiver as target for notifications for new matches below or with a
specified k (see Match.
addMatchNotificationTarget in interface ContinuousMatchingProcessthresholdK - - the threshold k.receiver - - the receiver for the notifications.
public CCMImplementation addMatchNotificationTarget(ContextPattern pattern,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousContextMatchingPlatform
addMatchNotificationTarget in interface ContinuousContextMatchingPlatformpattern - - the GraphPattern whose new matches will be notified to the receiver.receiver - - the receiver of notifications.
public ContinuousMatchingProcess removeMatchNotificationTarget(ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousMatchingProcessContinuousMatchingProcess.MatchNotificationReceiver.
removeMatchNotificationTarget in interface ContinuousMatchingProcessreceiver - - the specified notification receiver.
public ContinuousMatchingProcess startMatchingAgainstAllPatterns(Graph graph,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousContextMatchingPlatformContinuousMatchingProcess, unrelated to the platform except for the set of patterns, to
match all patterns against the specified Graph instance.
The matching process is started immediately
When matches of any k below or equal to the specified threshold are detected, the notification receiver is invoked.
startMatchingAgainstAllPatterns in interface ContinuousContextMatchingPlatformgraph - - the graph to match the patterns against.thresholdK - - the threshold k (see Match).receiver - - the receiver for match notifications.
ContinuousMatchingProcess instance.
public ContinuousMatchingProcess startMatchingAgainstGraph(Graph pattern,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousContextMatchingPlatformContinuousMatchingProcess, unrelated to the platform except for the current sequence of the
Context Graph (not the matching sequence), that matches the context graph against the specified pattern.
Matching is done against a shadow of the context graph. Any subsequent changes to the context graph will not be visible in the matching process.
Except for the snapshot of the context graph, this method uses no resources of the platform.
The matching process is started immediately.
When matches of any k below or equal to the specified threshold are detected, the notification receiver is invoked.
startMatchingAgainstGraph in interface ContinuousContextMatchingPlatformpattern - - the pattern to match (can be a normal Graph).thresholdK - - the threshold k (see Match).receiver - - the receiver for match notifications.
ContinuousMatchingProcess instance.public CCMImplementation startContinuousMatching()
ContinuousMatchingProcess
startContinuousMatching in interface ContinuousMatchingProcesspublic CCMImplementation stopContinuousMatching()
ContinuousMatchingProcess
stopContinuousMatching in interface ContinuousMatchingProcesspublic boolean isContinuouslyMatching()
isContinuouslyMatching in interface ContinuousMatchingProcesstrue if the process is currently ongoing (in a separate thread). false
otherwise.protected void getMatching()
protected void notifyContextChange()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||