Class SessionsAwareKnowledgeBase

    • Field Detail

      • kieBaseListeners

        public final 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 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​(Collection<? extends org.kie.api.definition.KiePackage> newPkgs)
        Specified by:
        addPackages in interface org.drools.core.impl.RuleBase
      • removeGlobal

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

        public 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​(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 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 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 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
      • hasSegmentPrototypes

        public boolean hasSegmentPrototypes()
        Specified by:
        hasSegmentPrototypes 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
      • getSegmentPrototype

        public org.drools.core.reteoo.SegmentMemory.Prototype 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​(Class<?> clazz)
        Specified by:
        getExactTypeDeclaration in interface org.drools.core.impl.RuleBase
      • getOrCreateExactTypeDeclaration

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

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

        public 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​(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
      • addGlobal

        public void addGlobal​(String identifier,
                              Class clazz)
        Specified by:
        addGlobal in interface org.drools.core.impl.RuleBase
      • getRule

        public org.kie.api.definition.rule.Rule getRule​(String packageName,
                                                        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​(String packageName,
                                                          String queryName)
        Specified by:
        getQuery in interface org.kie.api.KieBase
        Specified by:
        getQuery in interface org.drools.core.impl.RuleBase
      • getKiePackages

        public 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​(String packageName)
        Specified by:
        getKiePackage in interface org.kie.api.KieBase
        Specified by:
        getKiePackage in interface org.drools.core.impl.RuleBase
      • getId

        public 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 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 Map<String,​org.drools.core.definitions.InternalKnowledgePackage> getPackagesMap()
        Specified by:
        getPackagesMap in interface org.drools.core.impl.RuleBase
      • getGlobals

        public Map<String,​Class<?>> 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​(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​(String packageName,
                                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​(String packageName,
                               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​(Collection<org.drools.core.definitions.rule.impl.RuleImpl> rules)
        Specified by:
        removeRules in interface org.drools.core.impl.RuleBase
      • removeFunction

        public void removeFunction​(String packageName,
                                   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​(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​(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​(String name)
        Specified by:
        getPackage in interface org.drools.core.impl.RuleBase
      • getConfiguration

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

        public 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​(String packageName,
                                                                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 Set<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,
                                                          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 String getContainerId()
        Specified by:
        getContainerId in interface org.drools.core.impl.RuleBase
      • setContainerId

        public void setContainerId​(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 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.LeftTupleSource tupleSource,
                                             org.drools.core.reteoo.SegmentMemory smem)
        Specified by:
        registerSegmentPrototype in interface org.drools.core.impl.RuleBase