|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoolbus.matching.MatchStore
public class MatchStore
This store keeps track of all links between sending and receiving communication atoms.
Nested Class Summary | |
---|---|
private static class |
MatchStore.MappingRefCount
Reference count structure. |
Field Summary | |
---|---|
private java.util.List<Atom> |
atomSet
|
private toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,java.util.List<aterm.ATerm>> |
messageLinks
|
private java.lang.Object |
messageLock
|
private java.util.Map<aterm.ATerm,java.util.List<RecMsg>> |
messageMappings
|
private static java.util.List<RecMsg> |
NOMESSAGEPARTNERS
|
private static java.util.Set<ProcessInstance> |
NONOTEPARTNERS
|
private toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,java.util.List<aterm.ATerm>> |
noteLinks
|
private java.lang.Object |
noteLock
|
private java.util.Map<aterm.ATerm,java.util.Map<ProcessInstance,MatchStore.MappingRefCount>> |
noteMappings
|
private TBTermFactory |
tbFactory
|
Constructor Summary | |
---|---|
MatchStore(TBTermFactory tbTermFactory)
Constructor. |
Method Summary | |
---|---|
private void |
addReceiveMessagePattern(RecMsg message,
java.util.List<aterm.ATerm> receiveMessages)
Indexes the given receive message atom. |
private void |
addSendMessagePattern(SndMsg message,
java.util.List<aterm.ATerm> receiveMessages)
Indexes the given send message atom. |
private void |
addSendNotePattern(SndNote message,
java.util.List<aterm.ATerm> subscribeNotes)
Indexes the given send note atom. |
private void |
addSubscribeNotePattern(Subscribe subscribeNote,
java.util.List<aterm.ATerm> subscribeNotes)
Indexes the given subscribe atom. |
private void |
calculateMatches()
Staticly determains all (potential) relations between the atoms. |
void |
deregisterReceiveMessage(RecMsg receiveMessage)
Deregisteres the given, instantiated, receive message atom. |
void |
deregisterSubscribeNote(Subscribe subscribeNote)
Deregisters the given, instantiated, subscribe atom. |
java.util.List<RecMsg> |
findPartnerLessReceiveMessageAtoms()
Gathers a list of partnerless message receiving atoms. |
java.util.List<SndMsg> |
findPartnerlessSendMessageAtoms()
Gathers a list of partnerless message sending atoms. |
java.util.List<SndNote> |
findPartnerlessSendNoteAtoms()
Gathers a list of partnerless note sending atoms. |
java.util.List<Subscribe> |
findPartnerlessSubscribeAtoms()
Gathers a list of partnerless subscribe atoms. |
java.util.List<RecMsg> |
getPossibleMessagePartners(aterm.ATerm pattern)
Gathers the potential partners for the given send message pattern. |
java.util.Set<ProcessInstance> |
getPossibleNotePartners(aterm.ATerm pattern)
Gathers the potential partners for the given send note pattern. |
void |
initialize(java.util.List<Atom> atomSet)
Initializes this match store with the given set of atoms. |
void |
printPartnerlessCommunicationAtoms()
Dumps a list of partnerless communication atoms to standard out. |
private void |
printPartnerlessReceivers()
Dumps a list of partnerless receiving atoms to standard out. |
private void |
printPartnerlessSenders()
Dumps a list of partnerless sending atoms to standard out. |
void |
registerReceiveMessage(RecMsg receiveMessage)
Registers the given, instantiated, receive message atom. |
void |
registerSubscribeNote(Subscribe subscribeNote)
Registers the given, instantiated, subscribe atom. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.List<RecMsg> NOMESSAGEPARTNERS
private static final java.util.Set<ProcessInstance> NONOTEPARTNERS
private final TBTermFactory tbFactory
private volatile java.util.List<Atom> atomSet
private final toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,java.util.List<aterm.ATerm>> messageLinks
private final toolbus.util.collections.ConcurrentHashMap<aterm.ATerm,java.util.List<aterm.ATerm>> noteLinks
private final java.util.Map<aterm.ATerm,java.util.List<RecMsg>> messageMappings
private final java.util.Map<aterm.ATerm,java.util.Map<ProcessInstance,MatchStore.MappingRefCount>> noteMappings
private final java.lang.Object messageLock
private final java.lang.Object noteLock
Constructor Detail |
---|
public MatchStore(TBTermFactory tbTermFactory)
tbTermFactory
- The term factory to use for matching.Method Detail |
---|
public void initialize(java.util.List<Atom> atomSet)
atomSet
- The complete collection of atoms, for which the relations must to be calculated.private void calculateMatches()
private void addReceiveMessagePattern(RecMsg message, java.util.List<aterm.ATerm> receiveMessages)
message
- The receive message atom.receiveMessages
- The list to add the message's match pattern to.private void addSendMessagePattern(SndMsg message, java.util.List<aterm.ATerm> receiveMessages)
message
- The send message atom.receiveMessages
- The complete list of receive messages.private void addSubscribeNotePattern(Subscribe subscribeNote, java.util.List<aterm.ATerm> subscribeNotes)
subscribeNote
- The subscribe atom.subscribeNotes
- The list to add the subscribe's match pattern to.private void addSendNotePattern(SndNote message, java.util.List<aterm.ATerm> subscribeNotes)
message
- The send note atom.subscribeNotes
- The complete list of subscribes.public void registerReceiveMessage(RecMsg receiveMessage)
receiveMessage
- The receive message atom to register.public void deregisterReceiveMessage(RecMsg receiveMessage)
receiveMessage
- The receive message atom to deregister.public java.util.List<RecMsg> getPossibleMessagePartners(aterm.ATerm pattern)
pattern
- The send message pattern.
public void registerSubscribeNote(Subscribe subscribeNote)
subscribeNote
- The subscribe atom to register.public void deregisterSubscribeNote(Subscribe subscribeNote)
subscribeNote
- The subscribe atom to deregister.public java.util.Set<ProcessInstance> getPossibleNotePartners(aterm.ATerm pattern)
pattern
- The send message pattern.
public void printPartnerlessCommunicationAtoms()
public java.util.List<SndMsg> findPartnerlessSendMessageAtoms()
public java.util.List<SndNote> findPartnerlessSendNoteAtoms()
public java.util.List<RecMsg> findPartnerLessReceiveMessageAtoms()
public java.util.List<Subscribe> findPartnerlessSubscribeAtoms()
private void printPartnerlessSenders()
private void printPartnerlessReceivers()
|
The Meta-Environment API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |