Class SessionsAwareKnowledgeBase

  • All Implemented Interfaces:
    org.drools.core.impl.RuleBase, InternalKnowledgeBase, org.kie.api.event.kiebase.KieBaseEventManager, org.kie.api.KieBase

    public class SessionsAwareKnowledgeBase
    extends java.lang.Object
    implements InternalKnowledgeBase
    • Field Detail

      • kieBaseListeners

        public final java.util.Set<org.kie.api.event.kiebase.KieBaseEventListener> kieBaseListeners
    • Constructor Detail

      • SessionsAwareKnowledgeBase

        public SessionsAwareKnowledgeBase()
      • SessionsAwareKnowledgeBase

        public SessionsAwareKnowledgeBase​(org.kie.api.KieBaseConfiguration kbaseConfiguration)
      • SessionsAwareKnowledgeBase

        public SessionsAwareKnowledgeBase​(org.drools.core.impl.RuleBase delegate)
    • Method Detail

      • getDelegate

        public org.drools.core.impl.KnowledgeBaseImpl getDelegate()
      • getKieSessions

        public java.util.Collection<? extends org.kie.api.runtime.KieSession> getKieSessions()
        Specified by:
        getKieSessions in interface InternalKnowledgeBase
        Specified by:
        getKieSessions in interface org.kie.api.KieBase
      • newStatelessKieSession

        public org.kie.api.runtime.StatelessKieSession newStatelessKieSession​(org.kie.api.runtime.KieSessionConfiguration conf)
        Specified by:
        newStatelessKieSession in interface InternalKnowledgeBase
        Specified by:
        newStatelessKieSession in interface org.kie.api.KieBase
      • newStatelessKieSession

        public org.kie.api.runtime.StatelessKieSession newStatelessKieSession()
        Specified by:
        newStatelessKieSession in interface InternalKnowledgeBase
        Specified by:
        newStatelessKieSession in interface org.kie.api.KieBase
      • newKieSessionsPool

        public org.kie.api.runtime.KieSessionsPool newKieSessionsPool​(int initialSize)
        Specified by:
        newKieSessionsPool in interface InternalKnowledgeBase
        Specified by:
        newKieSessionsPool in interface org.kie.api.KieBase
      • newKieSession

        public org.kie.api.runtime.KieSession newKieSession()
        Specified by:
        newKieSession in interface InternalKnowledgeBase
        Specified by:
        newKieSession in interface org.kie.api.KieBase
      • newKieSession

        public org.kie.api.runtime.KieSession newKieSession​(org.kie.api.runtime.KieSessionConfiguration conf,
                                                            org.kie.api.runtime.Environment environment)
        Specified by:
        newKieSession in interface InternalKnowledgeBase
        Specified by:
        newKieSession in interface org.kie.api.KieBase
      • newKieSession

        public org.kie.api.runtime.KieSession newKieSession​(org.kie.api.runtime.KieSessionConfiguration conf,
                                                            org.kie.api.runtime.Environment environment,
                                                            boolean fromPool)
        Specified by:
        newKieSession in interface InternalKnowledgeBase
      • getWorkingMemoryCounter

        public int getWorkingMemoryCounter()
        Specified by:
        getWorkingMemoryCounter in interface org.drools.core.impl.RuleBase
      • addPackages

        public void addPackages​(java.util.Collection<? extends org.kie.api.definition.KiePackage> newPkgs)
        Specified by:
        addPackages in interface org.drools.core.impl.RuleBase
      • removeGlobal

        public void removeGlobal​(java.lang.String identifier)
        Specified by:
        removeGlobal in interface org.drools.core.impl.RuleBase
      • addPackage

        public java.util.concurrent.Future<org.kie.api.definition.KiePackage> addPackage​(org.kie.api.definition.KiePackage newPkg)
        Specified by:
        addPackage in interface org.drools.core.impl.RuleBase
      • removeKiePackage

        public void removeKiePackage​(java.lang.String packageName)
        Specified by:
        removeKiePackage in interface org.kie.api.KieBase
        Specified by:
        removeKiePackage in interface org.drools.core.impl.RuleBase
      • lock

        public void lock()
      • unlock

        public void unlock()
      • addEventListener

        public void addEventListener​(org.kie.api.event.kiebase.KieBaseEventListener listener)
        Specified by:
        addEventListener in interface org.kie.api.event.kiebase.KieBaseEventManager
      • removeEventListener

        public void removeEventListener​(org.kie.api.event.kiebase.KieBaseEventListener listener)
        Specified by:
        removeEventListener in interface org.kie.api.event.kiebase.KieBaseEventManager
      • getKieBaseEventListeners

        public java.util.Collection<org.kie.api.event.kiebase.KieBaseEventListener> getKieBaseEventListeners()
        Specified by:
        getKieBaseEventListeners in interface org.kie.api.event.kiebase.KieBaseEventManager
      • getSessionConfiguration

        public org.drools.core.SessionConfiguration getSessionConfiguration()
        Specified by:
        getSessionConfiguration in interface org.drools.core.impl.RuleBase
      • registerAddedEntryNodeCache

        public void registerAddedEntryNodeCache​(org.drools.core.reteoo.EntryPointNode node)
        Specified by:
        registerAddedEntryNodeCache in interface org.drools.core.impl.RuleBase
      • getAddedEntryNodeCache

        public java.util.Set<org.drools.core.reteoo.EntryPointNode> getAddedEntryNodeCache()
        Specified by:
        getAddedEntryNodeCache in interface org.drools.core.impl.RuleBase
      • registeRremovedEntryNodeCache

        public void registeRremovedEntryNodeCache​(org.drools.core.reteoo.EntryPointNode node)
        Specified by:
        registeRremovedEntryNodeCache in interface org.drools.core.impl.RuleBase
      • getRemovedEntryNodeCache

        public java.util.Set<org.drools.core.reteoo.EntryPointNode> getRemovedEntryNodeCache()
        Specified by:
        getRemovedEntryNodeCache in interface org.drools.core.impl.RuleBase
      • getRete

        public org.drools.core.reteoo.Rete getRete()
        Specified by:
        getRete in interface org.drools.core.impl.RuleBase
      • getReteooBuilder

        public org.drools.core.reteoo.ReteooBuilder getReteooBuilder()
        Specified by:
        getReteooBuilder in interface org.drools.core.impl.RuleBase
      • getNodeCount

        public int getNodeCount()
        Specified by:
        getNodeCount in interface org.drools.core.impl.RuleBase
      • getMemoryCount

        public int getMemoryCount()
        Specified by:
        getMemoryCount in interface org.drools.core.impl.RuleBase
      • invalidateSegmentPrototype

        public void invalidateSegmentPrototype​(org.drools.core.reteoo.LeftTupleNode rootNode)
        Specified by:
        invalidateSegmentPrototype in interface org.drools.core.impl.RuleBase
      • createSegmentFromPrototype

        public org.drools.core.reteoo.SegmentMemory createSegmentFromPrototype​(org.drools.core.common.ReteEvaluator reteEvaluator,
                                                                               org.drools.core.reteoo.LeftTupleSource tupleSource)
        Specified by:
        createSegmentFromPrototype in interface org.drools.core.impl.RuleBase
      • createSegmentFromPrototype

        public org.drools.core.reteoo.SegmentMemory createSegmentFromPrototype​(org.drools.core.common.ReteEvaluator reteEvaluator,
                                                                               org.drools.core.reteoo.SegmentMemory.SegmentPrototype smem)
        Specified by:
        createSegmentFromPrototype in interface org.drools.core.impl.RuleBase
      • hasSegmentPrototypes

        public boolean hasSegmentPrototypes()
        Specified by:
        hasSegmentPrototypes in interface org.drools.core.impl.RuleBase
      • getSegmentPrototype

        public org.drools.core.reteoo.SegmentMemory.SegmentPrototype getSegmentPrototype​(org.drools.core.reteoo.LeftTupleNode node)
        Specified by:
        getSegmentPrototype in interface org.drools.core.impl.RuleBase
      • getSegmentPrototype

        public org.drools.core.reteoo.SegmentMemory.SegmentPrototype getSegmentPrototype​(org.drools.core.reteoo.SegmentMemory segment)
        Specified by:
        getSegmentPrototype in interface org.drools.core.impl.RuleBase
      • getExactTypeDeclaration

        public org.drools.core.rule.TypeDeclaration getExactTypeDeclaration​(java.lang.Class<?> clazz)
        Specified by:
        getExactTypeDeclaration in interface org.drools.core.impl.RuleBase
      • getOrCreateExactTypeDeclaration

        public org.drools.core.rule.TypeDeclaration getOrCreateExactTypeDeclaration​(java.lang.Class<?> clazz)
        Specified by:
        getOrCreateExactTypeDeclaration in interface org.drools.core.impl.RuleBase
      • getTypeDeclaration

        public org.drools.core.rule.TypeDeclaration getTypeDeclaration​(java.lang.Class<?> clazz)
        Specified by:
        getTypeDeclaration in interface org.drools.core.impl.RuleBase
      • getTypeDeclarations

        public java.util.Collection<org.drools.core.rule.TypeDeclaration> getTypeDeclarations()
        Specified by:
        getTypeDeclarations in interface org.drools.core.impl.RuleBase
      • beforeIncrementalUpdate

        public void beforeIncrementalUpdate​(org.drools.core.impl.KieBaseUpdate kieBaseUpdate)
        Specified by:
        beforeIncrementalUpdate in interface org.drools.core.impl.RuleBase
      • afterIncrementalUpdate

        public void afterIncrementalUpdate​(org.drools.core.impl.KieBaseUpdate kieBaseUpdate)
        Specified by:
        afterIncrementalUpdate in interface org.drools.core.impl.RuleBase
      • processAllTypesDeclaration

        public void processAllTypesDeclaration​(java.util.Collection<org.drools.core.definitions.InternalKnowledgePackage> pkgs)
        Specified by:
        processAllTypesDeclaration in interface org.drools.core.impl.RuleBase
      • hasMultipleAgendaGroups

        public boolean hasMultipleAgendaGroups()
        Specified by:
        hasMultipleAgendaGroups in interface org.drools.core.impl.RuleBase
      • registerTypeDeclaration

        public void registerTypeDeclaration​(org.drools.core.rule.TypeDeclaration newDecl,
                                            org.drools.core.definitions.InternalKnowledgePackage newPkg)
        Specified by:
        registerTypeDeclaration in interface org.drools.core.impl.RuleBase
      • registerAndLoadTypeDefinition

        public java.lang.Class<?> registerAndLoadTypeDefinition​(java.lang.String className,
                                                                byte[] def)
                                                         throws java.lang.ClassNotFoundException
        Specified by:
        registerAndLoadTypeDefinition in interface org.drools.core.impl.RuleBase
        Throws:
        java.lang.ClassNotFoundException
      • addGlobal

        public void addGlobal​(java.lang.String identifier,
                              java.lang.reflect.Type type)
        Specified by:
        addGlobal in interface org.drools.core.impl.RuleBase
      • getRule

        public org.kie.api.definition.rule.Rule getRule​(java.lang.String packageName,
                                                        java.lang.String ruleName)
        Specified by:
        getRule in interface org.kie.api.KieBase
        Specified by:
        getRule in interface org.drools.core.impl.RuleBase
      • getQuery

        public org.kie.api.definition.rule.Query getQuery​(java.lang.String packageName,
                                                          java.lang.String queryName)
        Specified by:
        getQuery in interface org.kie.api.KieBase
        Specified by:
        getQuery in interface org.drools.core.impl.RuleBase
      • getKiePackages

        public java.util.Collection<org.kie.api.definition.KiePackage> getKiePackages()
        Specified by:
        getKiePackages in interface org.kie.api.KieBase
        Specified by:
        getKiePackages in interface org.drools.core.impl.RuleBase
      • getKiePackage

        public org.kie.api.definition.KiePackage getKiePackage​(java.lang.String packageName)
        Specified by:
        getKiePackage in interface org.kie.api.KieBase
        Specified by:
        getKiePackage in interface org.drools.core.impl.RuleBase
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface org.drools.core.impl.RuleBase
      • newFactHandleFactory

        public org.drools.core.rule.accessor.FactHandleFactory newFactHandleFactory()
        Specified by:
        newFactHandleFactory in interface org.drools.core.impl.RuleBase
      • newFactHandleFactory

        public org.drools.core.rule.accessor.FactHandleFactory newFactHandleFactory​(long id,
                                                                                    long counter)
        Specified by:
        newFactHandleFactory in interface org.drools.core.impl.RuleBase
      • getProcesses

        public java.util.Collection<org.kie.api.definition.process.Process> getProcesses()
        Specified by:
        getProcesses in interface org.kie.api.KieBase
        Specified by:
        getProcesses in interface org.drools.core.impl.RuleBase
      • getPackages

        public org.drools.core.definitions.InternalKnowledgePackage[] getPackages()
        Specified by:
        getPackages in interface org.drools.core.impl.RuleBase
      • getPackagesMap

        public java.util.Map<java.lang.String,​org.drools.core.definitions.InternalKnowledgePackage> getPackagesMap()
        Specified by:
        getPackagesMap in interface org.drools.core.impl.RuleBase
      • getGlobals

        public java.util.Map<java.lang.String,​java.lang.reflect.Type> getGlobals()
        Specified by:
        getGlobals in interface org.drools.core.impl.RuleBase
      • readLock

        public void readLock()
        Specified by:
        readLock in interface org.drools.core.impl.RuleBase
      • readUnlock

        public void readUnlock()
        Specified by:
        readUnlock in interface org.drools.core.impl.RuleBase
      • addRules

        public void addRules​(java.util.Collection<org.drools.core.definitions.rule.impl.RuleImpl> rules)
                      throws org.drools.core.rule.InvalidPatternException
        Specified by:
        addRules in interface org.drools.core.impl.RuleBase
        Throws:
        org.drools.core.rule.InvalidPatternException
      • removeQuery

        public void removeQuery​(java.lang.String packageName,
                                java.lang.String ruleName)
        Specified by:
        removeQuery in interface org.kie.api.KieBase
        Specified by:
        removeQuery in interface org.drools.core.impl.RuleBase
      • removeRule

        public void removeRule​(java.lang.String packageName,
                               java.lang.String ruleName)
        Specified by:
        removeRule in interface org.kie.api.KieBase
        Specified by:
        removeRule in interface org.drools.core.impl.RuleBase
      • removeRules

        public void removeRules​(java.util.Collection<org.drools.core.definitions.rule.impl.RuleImpl> rules)
        Specified by:
        removeRules in interface org.drools.core.impl.RuleBase
      • removeFunction

        public void removeFunction​(java.lang.String packageName,
                                   java.lang.String functionName)
        Specified by:
        removeFunction in interface org.kie.api.KieBase
        Specified by:
        removeFunction in interface org.drools.core.impl.RuleBase
      • addProcess

        public void addProcess​(org.kie.api.definition.process.Process process)
        Specified by:
        addProcess in interface org.drools.core.impl.RuleBase
      • removeProcess

        public void removeProcess​(java.lang.String id)
        Specified by:
        removeProcess in interface org.kie.api.KieBase
        Specified by:
        removeProcess in interface org.drools.core.impl.RuleBase
      • getProcess

        public org.kie.api.definition.process.Process getProcess​(java.lang.String id)
        Specified by:
        getProcess in interface org.kie.api.KieBase
        Specified by:
        getProcess in interface org.drools.core.impl.RuleBase
      • getPackage

        public org.drools.core.definitions.InternalKnowledgePackage getPackage​(java.lang.String name)
        Specified by:
        getPackage in interface org.drools.core.impl.RuleBase
      • getKieBaseConfiguration

        public org.drools.core.KieBaseConfigurationImpl getKieBaseConfiguration()
        Specified by:
        getKieBaseConfiguration in interface org.drools.core.impl.RuleBase
      • getConfiguration

        public org.kie.api.KieBaseConfiguration getConfiguration()
        Specified by:
        getConfiguration in interface org.drools.core.impl.RuleBase
      • getRuleBaseConfiguration

        public org.drools.core.RuleBaseConfiguration getRuleBaseConfiguration()
        Specified by:
        getRuleBaseConfiguration in interface org.drools.core.impl.RuleBase
      • getRootClassLoader

        public java.lang.ClassLoader getRootClassLoader()
        Specified by:
        getRootClassLoader in interface org.drools.core.impl.RuleBase
      • executeQueuedActions

        public void executeQueuedActions()
        Specified by:
        executeQueuedActions in interface org.drools.core.impl.RuleBase
      • createNewPartitionId

        public org.drools.core.common.RuleBasePartitionId createNewPartitionId()
        Specified by:
        createNewPartitionId in interface org.drools.core.impl.RuleBase
      • getFactType

        public org.kie.api.definition.type.FactType getFactType​(java.lang.String packageName,
                                                                java.lang.String typeName)
        Specified by:
        getFactType in interface org.kie.api.KieBase
        Specified by:
        getFactType in interface org.drools.core.impl.RuleBase
      • getClassFieldAccessorCache

        public org.drools.core.base.ClassFieldAccessorCache getClassFieldAccessorCache()
        Specified by:
        getClassFieldAccessorCache in interface org.drools.core.impl.RuleBase
      • getEntryPointIds

        public java.util.Set<java.lang.String> getEntryPointIds()
        Specified by:
        getEntryPointIds in interface org.kie.api.KieBase
        Specified by:
        getEntryPointIds in interface org.drools.core.impl.RuleBase
      • removeObjectsGeneratedFromResource

        public boolean removeObjectsGeneratedFromResource​(org.kie.api.io.Resource resource,
                                                          java.util.Collection<org.drools.core.common.InternalWorkingMemory> workingMemories)
        Specified by:
        removeObjectsGeneratedFromResource in interface org.drools.core.impl.RuleBase
      • getResolvedReleaseId

        public org.kie.api.builder.ReleaseId getResolvedReleaseId()
        Specified by:
        getResolvedReleaseId in interface org.drools.core.impl.RuleBase
      • setResolvedReleaseId

        public void setResolvedReleaseId​(org.kie.api.builder.ReleaseId currentReleaseId)
        Specified by:
        setResolvedReleaseId in interface org.drools.core.impl.RuleBase
      • getContainerId

        public java.lang.String getContainerId()
        Specified by:
        getContainerId in interface org.drools.core.impl.RuleBase
      • setContainerId

        public void setContainerId​(java.lang.String containerId)
        Specified by:
        setContainerId in interface org.drools.core.impl.RuleBase
      • getRuleUnitDescriptionRegistry

        public org.drools.core.ruleunit.RuleUnitDescriptionRegistry getRuleUnitDescriptionRegistry()
        Specified by:
        getRuleUnitDescriptionRegistry in interface org.drools.core.impl.RuleBase
      • hasUnits

        public boolean hasUnits()
        Specified by:
        hasUnits in interface org.drools.core.impl.RuleBase
      • getReceiveNodes

        public java.util.List<org.drools.core.reteoo.AsyncReceiveNode> getReceiveNodes()
        Specified by:
        getReceiveNodes in interface org.drools.core.impl.RuleBase
      • addReceiveNode

        public void addReceiveNode​(org.drools.core.reteoo.AsyncReceiveNode node)
        Specified by:
        addReceiveNode in interface org.drools.core.impl.RuleBase
      • registerSegmentPrototype

        public void registerSegmentPrototype​(org.drools.core.reteoo.LeftTupleNode tupleSource,
                                             org.drools.core.reteoo.SegmentMemory.SegmentPrototype smem)
        Specified by:
        registerSegmentPrototype in interface org.drools.core.impl.RuleBase