Java Doc for AbstractWorkingMemory.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » common » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » drolls Rule Engine » org.drools.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.drools.common.AbstractWorkingMemory

All known Subclasses:   org.drools.reteoo.ReteooWorkingMemory,
AbstractWorkingMemory
abstract public class AbstractWorkingMemory implements InternalWorkingMemoryActions,EventSupport,PropertyChangeListener(Code)
Implementation of WorkingMemory.
author:
   bob mcwhirter
author:
   Mark Proctor
author:
   Simon Harris

Inner Class :public class RuleFlowDeactivateEvent

Field Summary
final protected static  Class[]ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES
    
final protected static  ObjectNULL
    
final protected  ListactionQueue
    
final protected  Object[]addRemovePropertyChangeListenerArgs
     The arguments used when adding/removing a property change listener.
protected  DefaultAgendaagenda
     Rule-firing agenda.
protected  AgendaEventSupportagendaEventSupport
    
final protected  booleandiscardOnLogicalOverride
    
protected  booleanfiring
     Flag to determine if a rule is currently being fired.
protected  GlobalResolverglobalResolver
     Global values which are associated with this memory.
protected  booleanhalt
    
final protected  FactHandleFactoryhandleFactory
    
final protected  longid
    
final protected  ReentrantLocklock
    
final protected  PrimitiveLongMapnodeMemories
     The actual memory for the JoinNodes.
protected  longpropagationIdCounter
    
protected  MapqueryResults
    
protected transient  InternalRuleBaseruleBase
     The RuleBase with which this memory is associated.
protected  RuleFlowEventSupportruleFlowEventSupport
    
final protected  TruthMaintenanceSystemtms
    
protected  WorkingMemoryEventSupportworkingMemoryEventSupport
    

Constructor Summary
public  AbstractWorkingMemory(int id, InternalRuleBase ruleBase, FactHandleFactory handleFactory)
     Construct.

Method Summary
public  voidaddEventListener(WorkingMemoryEventListener listener)
    
public  voidaddEventListener(AgendaEventListener listener)
    
public  voidaddEventListener(RuleFlowEventListener listener)
    
public  voidaddLIANodePropagation(LIANodePropagation liaNodePropagation)
    
protected  voidaddPropertyChangeListener(Object object)
    
public  voidclearActivationGroup(String group)
    
public  voidclearAgenda()
    
public  voidclearAgendaGroup(String group)
    
public  voidclearNodeMemory(NodeMemory node)
    
public  voidclearRuleFlowGroup(String group)
    
abstract public  voiddoInsert(InternalFactHandle factHandle, Object object, PropagationContext propagationContext)
    
abstract public  voiddoRetract(InternalFactHandle factHandle, PropagationContext propagationContext)
    
public  voidexecuteQueuedActions()
    
public synchronized  voidfireAllRules()
    
public synchronized  voidfireAllRules(int fireLimit)
    
public synchronized  voidfireAllRules(AgendaFilter agendaFilter)
    
public synchronized  voidfireAllRules(AgendaFilter agendaFilter, int fireLimit)
    
public  Entry[]getActivationParameters(long activationId)
    
public  MapgetActivationParameters(Activation activation)
    
public  AgendagetAgenda()
    
public  ListgetAgendaEventListeners()
    
public  AgendaEventSupportgetAgendaEventSupport()
    
public  FactHandlegetFactHandle(Object object)
    
public  FactHandleFactorygetFactHandleFactory()
    
public  ObjectHashMapgetFactHandleMap()
    
public  AgendaGroupgetFocus()
    
public  ObjectgetGlobal(String identifier)
    
public  GlobalResolvergetGlobalResolver()
    
public  longgetId()
    
public  LockgetLock()
    
public  longgetNextPropagationIdCounter()
    
public  ObjectgetNodeMemory(NodeMemory node)
     Retrieve the JoinMemory for a particular JoinNode.
Parameters:
  node - The JoinNode key.
public  ObjectgetObject(FactHandle handle)
     Returns the fact Object for the given FactHandle.
abstract public  QueryResultsgetQueryResults(String query)
    
public  RuleBasegetRuleBase()
    
public  ListgetRuleFlowEventListeners()
    
public  RuleFlowEventSupportgetRuleFlowEventSupport()
    
public  TruthMaintenanceSystemgetTruthMaintenanceSystem()
    
public  ListgetWorkingMemoryEventListeners()
    
public  WorkingMemoryEventSupportgetWorkingMemoryEventSupport()
    
public  voidhalt()
    
public  FactHandleinsert(Object object)
    
public  FactHandleinsert(Object object, boolean dynamic)
    
public  FactHandleinsert(Object object, boolean dynamic, boolean logical, Rule rule, Activation activation)
    
public  FactHandleinsertLogical(Object object)
    
public  FactHandleinsertLogical(Object object, boolean dynamic)
    
public  booleanisSequential()
    
public  IteratoriterateFactHandles()
    
public  IteratoriterateFactHandles(ObjectFilter filter)
    
public  IteratoriterateObjects()
    
public  IteratoriterateObjects(ObjectFilter filter)
    
public  ListiterateObjectsToList()
    
public  voidmodifyInsert(FactHandle factHandle, Object object)
    
public  voidmodifyInsert(FactHandle factHandle, Object object, Rule rule, Activation activation)
    
public  voidmodifyRetract(FactHandle factHandle)
    
public  voidmodifyRetract(FactHandle factHandle, Rule rule, Activation activation)
    
public  voidpropertyChange(PropertyChangeEvent event)
    
public  voidqueueWorkingMemoryAction(WorkingMemoryAction action)
    
public  voidremoveEventListener(WorkingMemoryEventListener listener)
    
public  voidremoveEventListener(AgendaEventListener listener)
    
public  voidremoveEventListener(RuleFlowEventListener listener)
    
public  voidremoveLogicalDependencies(Activation activation, PropagationContext context, Rule rule)
    
protected  voidremovePropertyChangeListener(FactHandle handle)
    
public  voidretract(FactHandle handle)
    
public  voidretract(FactHandle factHandle, boolean removeLogical, boolean updateEqualsMap, Rule rule, Activation activation)
    
public  voidsetAgendaEventSupport(AgendaEventSupport agendaEventSupport)
    
public  voidsetAsyncExceptionHandler(AsyncExceptionHandler handler)
     Sets the AsyncExceptionHandler to handle exceptions thrown by the Agenda Scheduler used for duration rules.
public  voidsetFocus(String focus)
    
public  voidsetFocus(AgendaGroup focus)
    
public  voidsetGlobal(String identifier, Object value)
    
public  voidsetGlobalResolver(GlobalResolver globalResolver)
    
 voidsetRuleBase(InternalRuleBase ruleBase)
    
public  voidsetRuleFlowEventSupport(RuleFlowEventSupport ruleFlowEventSupport)
    
public  voidsetWorkingMemoryEventSupport(WorkingMemoryEventSupport workingMemoryEventSupport)
    
public  ProcessInstancestartProcess(String processId)
    
public  voidupdate(FactHandle handle, Object object)
    
public  voidupdate(FactHandle factHandle, Object object, Rule rule, Activation activation)
     modify is implemented as half way retract / assert due to the truth maintenance issues.

Field Detail
ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES
final protected static Class[] ADD_REMOVE_PROPERTY_CHANGE_LISTENER_ARG_TYPES(Code)



NULL
final protected static Object NULL(Code)



actionQueue
final protected List actionQueue(Code)



addRemovePropertyChangeListenerArgs
final protected Object[] addRemovePropertyChangeListenerArgs(Code)
The arguments used when adding/removing a property change listener.



agenda
protected DefaultAgenda agenda(Code)
Rule-firing agenda.



agendaEventSupport
protected AgendaEventSupport agendaEventSupport(Code)



discardOnLogicalOverride
final protected boolean discardOnLogicalOverride(Code)



firing
protected boolean firing(Code)
Flag to determine if a rule is currently being fired.



globalResolver
protected GlobalResolver globalResolver(Code)
Global values which are associated with this memory.



halt
protected boolean halt(Code)



handleFactory
final protected FactHandleFactory handleFactory(Code)



id
final protected long id(Code)



lock
final protected ReentrantLock lock(Code)



nodeMemories
final protected PrimitiveLongMap nodeMemories(Code)
The actual memory for the JoinNodes.



propagationIdCounter
protected long propagationIdCounter(Code)



queryResults
protected Map queryResults(Code)



ruleBase
protected transient InternalRuleBase ruleBase(Code)
The RuleBase with which this memory is associated.



ruleFlowEventSupport
protected RuleFlowEventSupport ruleFlowEventSupport(Code)



tms
final protected TruthMaintenanceSystem tms(Code)



workingMemoryEventSupport
protected WorkingMemoryEventSupport workingMemoryEventSupport(Code)
The eventSupport




Constructor Detail
AbstractWorkingMemory
public AbstractWorkingMemory(int id, InternalRuleBase ruleBase, FactHandleFactory handleFactory)(Code)
Construct.
Parameters:
  ruleBase - The backing rule-base.




Method Detail
addEventListener
public void addEventListener(WorkingMemoryEventListener listener)(Code)



addEventListener
public void addEventListener(AgendaEventListener listener)(Code)



addEventListener
public void addEventListener(RuleFlowEventListener listener)(Code)



addLIANodePropagation
public void addLIANodePropagation(LIANodePropagation liaNodePropagation)(Code)



addPropertyChangeListener
protected void addPropertyChangeListener(Object object)(Code)



clearActivationGroup
public void clearActivationGroup(String group)(Code)



clearAgenda
public void clearAgenda()(Code)



clearAgendaGroup
public void clearAgendaGroup(String group)(Code)



clearNodeMemory
public void clearNodeMemory(NodeMemory node)(Code)



clearRuleFlowGroup
public void clearRuleFlowGroup(String group)(Code)



doInsert
abstract public void doInsert(InternalFactHandle factHandle, Object object, PropagationContext propagationContext) throws FactException(Code)



doRetract
abstract public void doRetract(InternalFactHandle factHandle, PropagationContext propagationContext)(Code)



executeQueuedActions
public void executeQueuedActions()(Code)



fireAllRules
public synchronized void fireAllRules() throws FactException(Code)



fireAllRules
public synchronized void fireAllRules(int fireLimit) throws FactException(Code)



fireAllRules
public synchronized void fireAllRules(AgendaFilter agendaFilter) throws FactException(Code)



fireAllRules
public synchronized void fireAllRules(AgendaFilter agendaFilter, int fireLimit) throws FactException(Code)



getActivationParameters
public Entry[] getActivationParameters(long activationId)(Code)



getActivationParameters
public Map getActivationParameters(Activation activation)(Code)
Helper method



getAgenda
public Agenda getAgenda()(Code)



getAgendaEventListeners
public List getAgendaEventListeners()(Code)



getAgendaEventSupport
public AgendaEventSupport getAgendaEventSupport()(Code)



getFactHandle
public FactHandle getFactHandle(Object object)(Code)

See Also:   WorkingMemory



getFactHandleFactory
public FactHandleFactory getFactHandleFactory()(Code)



getFactHandleMap
public ObjectHashMap getFactHandleMap()(Code)
This is an internal method, used to avoid java.util.Iterator adaptors



getFocus
public AgendaGroup getFocus()(Code)



getGlobal
public Object getGlobal(String identifier)(Code)



getGlobalResolver
public GlobalResolver getGlobalResolver()(Code)



getId
public long getId()(Code)



getLock
public Lock getLock()(Code)



getNextPropagationIdCounter
public long getNextPropagationIdCounter()(Code)



getNodeMemory
public Object getNodeMemory(NodeMemory node)(Code)
Retrieve the JoinMemory for a particular JoinNode.
Parameters:
  node - The JoinNode key. The node's memory.



getObject
public Object getObject(FactHandle handle)(Code)
Returns the fact Object for the given FactHandle. It actually attemps to return the value from the handle, before retrieving it from objects map.
See Also:   WorkingMemory
Parameters:
  handle - The FactHandle reference for theObject lookup



getQueryResults
abstract public QueryResults getQueryResults(String query)(Code)



getRuleBase
public RuleBase getRuleBase()(Code)



getRuleFlowEventListeners
public List getRuleFlowEventListeners()(Code)



getRuleFlowEventSupport
public RuleFlowEventSupport getRuleFlowEventSupport()(Code)



getTruthMaintenanceSystem
public TruthMaintenanceSystem getTruthMaintenanceSystem()(Code)



getWorkingMemoryEventListeners
public List getWorkingMemoryEventListeners()(Code)



getWorkingMemoryEventSupport
public WorkingMemoryEventSupport getWorkingMemoryEventSupport()(Code)



halt
public void halt()(Code)



insert
public FactHandle insert(Object object) throws FactException(Code)

See Also:   WorkingMemory



insert
public FactHandle insert(Object object, boolean dynamic) throws FactException(Code)



insert
public FactHandle insert(Object object, boolean dynamic, boolean logical, Rule rule, Activation activation) throws FactException(Code)



insertLogical
public FactHandle insertLogical(Object object) throws FactException(Code)

See Also:   WorkingMemory



insertLogical
public FactHandle insertLogical(Object object, boolean dynamic) throws FactException(Code)



isSequential
public boolean isSequential()(Code)



iterateFactHandles
public Iterator iterateFactHandles()(Code)
This class is not thread safe, changes to the working memory during iteration may give unexpected results



iterateFactHandles
public Iterator iterateFactHandles(ObjectFilter filter)(Code)
This class is not thread safe, changes to the working memory during iteration may give unexpected results



iterateObjects
public Iterator iterateObjects()(Code)
This class is not thread safe, changes to the working memory during iteration may give unexpected results



iterateObjects
public Iterator iterateObjects(ObjectFilter filter)(Code)
This class is not thread safe, changes to the working memory during iteration may give unexpected results



iterateObjectsToList
public List iterateObjectsToList()(Code)



modifyInsert
public void modifyInsert(FactHandle factHandle, Object object)(Code)



modifyInsert
public void modifyInsert(FactHandle factHandle, Object object, Rule rule, Activation activation)(Code)



modifyRetract
public void modifyRetract(FactHandle factHandle)(Code)



modifyRetract
public void modifyRetract(FactHandle factHandle, Rule rule, Activation activation)(Code)



propertyChange
public void propertyChange(PropertyChangeEvent event)(Code)



queueWorkingMemoryAction
public void queueWorkingMemoryAction(WorkingMemoryAction action)(Code)



removeEventListener
public void removeEventListener(WorkingMemoryEventListener listener)(Code)



removeEventListener
public void removeEventListener(AgendaEventListener listener)(Code)



removeEventListener
public void removeEventListener(RuleFlowEventListener listener)(Code)



removeLogicalDependencies
public void removeLogicalDependencies(Activation activation, PropagationContext context, Rule rule) throws FactException(Code)



removePropertyChangeListener
protected void removePropertyChangeListener(FactHandle handle)(Code)



retract
public void retract(FactHandle handle) throws FactException(Code)



retract
public void retract(FactHandle factHandle, boolean removeLogical, boolean updateEqualsMap, Rule rule, Activation activation) throws FactException(Code)

See Also:   WorkingMemory



setAgendaEventSupport
public void setAgendaEventSupport(AgendaEventSupport agendaEventSupport)(Code)



setAsyncExceptionHandler
public void setAsyncExceptionHandler(AsyncExceptionHandler handler)(Code)
Sets the AsyncExceptionHandler to handle exceptions thrown by the Agenda Scheduler used for duration rules.
Parameters:
  handler -



setFocus
public void setFocus(String focus)(Code)



setFocus
public void setFocus(AgendaGroup focus)(Code)



setGlobal
public void setGlobal(String identifier, Object value)(Code)



setGlobalResolver
public void setGlobalResolver(GlobalResolver globalResolver)(Code)



setRuleBase
void setRuleBase(InternalRuleBase ruleBase)(Code)



setRuleFlowEventSupport
public void setRuleFlowEventSupport(RuleFlowEventSupport ruleFlowEventSupport)(Code)



setWorkingMemoryEventSupport
public void setWorkingMemoryEventSupport(WorkingMemoryEventSupport workingMemoryEventSupport)(Code)



startProcess
public ProcessInstance startProcess(String processId)(Code)



update
public void update(FactHandle handle, Object object) throws FactException(Code)



update
public void update(FactHandle factHandle, Object object, Rule rule, Activation activation) throws FactException(Code)
modify is implemented as half way retract / assert due to the truth maintenance issues.
See Also:   WorkingMemory



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.