public class KnowledgeBaseImpl extends Object implements InternalKnowledgeBase, Externalizable
| Modifier and Type | Class and Description |
|---|---|
static interface |
KnowledgeBaseImpl.ClassRegister |
| Modifier and Type | Field and Description |
|---|---|
List<List<String>> |
jaxbClasses |
Set<org.kie.api.event.kiebase.KieBaseEventListener> |
kieBaseListeners |
protected static org.slf4j.Logger |
logger |
protected Map<String,InternalKnowledgePackage> |
pkgs |
| Constructor and Description |
|---|
KnowledgeBaseImpl() |
KnowledgeBaseImpl(String id,
RuleBaseConfiguration config) |
protected static final transient org.slf4j.Logger logger
protected Map<String,InternalKnowledgePackage> pkgs
public final Set<org.kie.api.event.kiebase.KieBaseEventListener> kieBaseListeners
public KnowledgeBaseImpl()
public KnowledgeBaseImpl(String id, RuleBaseConfiguration config)
public void initMBeans()
initMBeans in interface InternalKnowledgeBasepublic int nextWorkingMemoryCounter()
nextWorkingMemoryCounter in interface InternalKnowledgeBasepublic int getWorkingMemoryCounter()
getWorkingMemoryCounter in interface InternalKnowledgeBasepublic void addEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener)
addEventListener in interface org.kie.api.event.kiebase.KieBaseEventManagerpublic void removeEventListener(org.kie.api.event.kiebase.KieBaseEventListener listener)
removeEventListener in interface org.kie.api.event.kiebase.KieBaseEventManagerpublic Collection<org.kie.api.event.kiebase.KieBaseEventListener> getKieBaseEventListeners()
getKieBaseEventListeners in interface org.kie.api.event.kiebase.KieBaseEventManagerpublic SessionConfiguration getSessionConfiguration()
getSessionConfiguration in interface InternalKnowledgeBasepublic void removeKiePackage(String packageName)
removeKiePackage in interface org.kie.api.KieBasepublic org.kie.api.definition.rule.Rule getRule(String packageName, String ruleName)
getRule in interface org.kie.api.KieBasepublic org.kie.api.definition.rule.Query getQuery(String packageName, String queryName)
getQuery in interface org.kie.api.KieBasepublic org.kie.api.runtime.KieSessionsPool newKieSessionsPool(int initialSize)
newKieSessionsPool in interface org.kie.api.KieBasepublic org.kie.api.runtime.KieSession newKieSession()
newKieSession in interface org.kie.api.KieBasepublic org.kie.api.runtime.KieSession newKieSession(org.kie.api.runtime.KieSessionConfiguration conf,
org.kie.api.runtime.Environment environment)
newKieSession in interface org.kie.api.KieBasepublic StatefulKnowledgeSessionImpl createSession(long id, FactHandleFactory handleFactory, long propagationContext, SessionConfiguration config, InternalAgenda agenda, org.kie.api.runtime.Environment environment)
createSession in interface InternalKnowledgeBasepublic StatefulKnowledgeSessionImpl internalCreateStatefulKnowledgeSession(org.kie.api.runtime.Environment environment, SessionConfiguration sessionConfig, boolean fromPool)
public Collection<? extends org.kie.api.runtime.KieSession> getKieSessions()
getKieSessions in interface org.kie.api.KieBasepublic org.kie.api.runtime.StatelessKieSession newStatelessKieSession(org.kie.api.runtime.KieSessionConfiguration conf)
newStatelessKieSession in interface org.kie.api.KieBasepublic org.kie.api.runtime.StatelessKieSession newStatelessKieSession()
newStatelessKieSession in interface org.kie.api.KieBasepublic Collection<org.kie.api.definition.KiePackage> getKiePackages()
getKiePackages in interface org.kie.api.KieBasepublic org.kie.api.definition.KiePackage getKiePackage(String packageName)
getKiePackage in interface org.kie.api.KieBasepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic String getId()
getId in interface InternalKnowledgeBasepublic void disposeStatefulSession(StatefulKnowledgeSessionImpl statefulSession)
disposeStatefulSession in interface InternalKnowledgeBasepublic FactHandleFactory newFactHandleFactory()
newFactHandleFactory in interface InternalKnowledgeBasepublic FactHandleFactory newFactHandleFactory(long id, long counter)
newFactHandleFactory in interface InternalKnowledgeBasepublic Collection<org.kie.api.definition.process.Process> getProcesses()
getProcesses in interface org.kie.api.KieBasepublic InternalKnowledgePackage[] getPackages()
public Map<String,InternalKnowledgePackage> getPackagesMap()
getPackagesMap in interface InternalKnowledgeBasepublic Map<String,Class<?>> getGlobals()
getGlobals in interface InternalKnowledgeBasepublic void readLock()
readLock in interface InternalKnowledgeBasepublic void readUnlock()
readUnlock in interface InternalKnowledgeBasepublic void addPackages(Collection<? extends org.kie.api.definition.KiePackage> newPkgs)
Package to the network. Iterates through the
Package adding Each individual Rule to the
network. Before update network each referenced WorkingMemory
is locked.addPackages in interface InternalKnowledgeBasenewPkgs - The package to add.public Future<org.kie.api.definition.KiePackage> addPackage(org.kie.api.definition.KiePackage newPkg)
addPackage in interface InternalKnowledgeBasepublic void enqueueModification(Runnable modification)
enqueueModification in interface InternalKnowledgeBasepublic boolean flushModifications()
flushModifications in interface InternalKnowledgeBasepublic void processAllTypesDeclaration(Collection<InternalKnowledgePackage> pkgs)
processAllTypesDeclaration in interface InternalKnowledgeBasepublic static void registerFunctionClassAndInnerClasses(String functionClassName, JavaDialectRuntimeData runtime, KnowledgeBaseImpl.ClassRegister consumer) throws ClassNotFoundException
ClassNotFoundExceptionpublic void registerTypeDeclaration(TypeDeclaration newDecl, InternalKnowledgePackage newPkg)
registerTypeDeclaration in interface InternalKnowledgeBaseprotected void processTypeDeclaration(TypeDeclaration newDecl, InternalKnowledgePackage newPkg)
public Class<?> registerAndLoadTypeDefinition(String className, byte[] def) throws ClassNotFoundException
registerAndLoadTypeDefinition in interface InternalKnowledgeBaseClassNotFoundExceptionpublic void addGlobal(String identifier, Class clazz)
addGlobal in interface InternalKnowledgeBasepublic void removeGlobal(String identifier)
removeGlobal in interface InternalKnowledgeBaseprotected void setupRete()
public void registerAddedEntryNodeCache(EntryPointNode node)
registerAddedEntryNodeCache in interface InternalKnowledgeBasepublic Set<EntryPointNode> getAddedEntryNodeCache()
getAddedEntryNodeCache in interface InternalKnowledgeBasepublic void registeRremovedEntryNodeCache(EntryPointNode node)
registeRremovedEntryNodeCache in interface InternalKnowledgeBasepublic Set<EntryPointNode> getRemovedEntryNodeCache()
getRemovedEntryNodeCache in interface InternalKnowledgeBasepublic Rete getRete()
RuleBase.getRete in interface InternalKnowledgeBasepublic ReteooBuilder getReteooBuilder()
getReteooBuilder in interface InternalKnowledgeBasepublic int getNodeCount()
getNodeCount in interface InternalKnowledgeBasepublic int getMemoryCount(String topic)
getMemoryCount in interface InternalKnowledgeBasepublic void registerSegmentPrototype(LeftTupleSource tupleSource, SegmentMemory smem)
public boolean hasSegmentPrototypes()
hasSegmentPrototypes in interface InternalKnowledgeBasepublic void invalidateSegmentPrototype(LeftTupleNode rootNode)
invalidateSegmentPrototype in interface InternalKnowledgeBasepublic SegmentMemory createSegmentFromPrototype(InternalWorkingMemory wm, LeftTupleSource tupleSource)
createSegmentFromPrototype in interface InternalKnowledgeBasepublic SegmentMemory.Prototype getSegmentPrototype(SegmentMemory segment)
getSegmentPrototype in interface InternalKnowledgeBasepublic TypeDeclaration getExactTypeDeclaration(Class<?> clazz)
getExactTypeDeclaration in interface InternalKnowledgeBasepublic TypeDeclaration getOrCreateExactTypeDeclaration(Class<?> clazz)
getOrCreateExactTypeDeclaration in interface InternalKnowledgeBasepublic TypeDeclaration getTypeDeclaration(Class<?> clazz)
getTypeDeclaration in interface InternalKnowledgeBasepublic Collection<TypeDeclaration> getTypeDeclarations()
getTypeDeclarations in interface InternalKnowledgeBasepublic void addRules(Collection<RuleImpl> rules) throws InvalidPatternException
addRules in interface InternalKnowledgeBaseInvalidPatternExceptionpublic void removeQuery(String packageName, String ruleName)
removeQuery in interface org.kie.api.KieBasepublic void removeRule(String packageName, String ruleName)
removeRule in interface org.kie.api.KieBasepublic void removeRules(Collection<RuleImpl> rules)
removeRules in interface InternalKnowledgeBasepublic void removeFunction(String packageName, String functionName)
removeFunction in interface org.kie.api.KieBasepublic void addProcess(org.kie.api.definition.process.Process process)
addProcess in interface InternalKnowledgeBasepublic void removeProcess(String id)
removeProcess in interface InternalKnowledgeBaseremoveProcess in interface org.kie.api.KieBasepublic org.kie.api.definition.process.Process getProcess(String id)
getProcess in interface org.kie.api.KieBasepublic void addStatefulSession(StatefulKnowledgeSessionImpl wm)
public InternalKnowledgePackage getPackage(String name)
getPackage in interface InternalKnowledgeBasepublic Collection<InternalWorkingMemory> getWorkingMemories()
getWorkingMemories in interface InternalKnowledgeBasepublic RuleBaseConfiguration getConfiguration()
getConfiguration in interface InternalKnowledgeBasepublic ClassLoader getRootClassLoader()
getRootClassLoader in interface InternalKnowledgeBasepublic void executeQueuedActions()
executeQueuedActions in interface InternalKnowledgeBasepublic RuleBasePartitionId createNewPartitionId()
createNewPartitionId in interface InternalKnowledgeBasepublic org.kie.api.definition.type.FactType getFactType(String packageName, String typeName)
getFactType in interface org.kie.api.KieBasepublic ClassFieldAccessorCache getClassFieldAccessorCache()
getClassFieldAccessorCache in interface InternalKnowledgeBasepublic Set<String> getEntryPointIds()
getEntryPointIds in interface org.kie.api.KieBasepublic TripleStore getTripleStore()
getTripleStore in interface InternalKnowledgeBasepublic TraitRegistry getTraitRegistry()
getTraitRegistry in interface InternalKnowledgeBasepublic boolean removeObjectsGeneratedFromResource(org.kie.api.io.Resource resource)
removeObjectsGeneratedFromResource in interface InternalKnowledgeBasepublic org.kie.api.builder.ReleaseId getResolvedReleaseId()
getResolvedReleaseId in interface InternalKnowledgeBasepublic void setResolvedReleaseId(org.kie.api.builder.ReleaseId currentReleaseId)
setResolvedReleaseId in interface InternalKnowledgeBasepublic String getContainerId()
getContainerId in interface InternalKnowledgeBasepublic void setContainerId(String containerId)
setContainerId in interface InternalKnowledgeBasepublic void setKieContainer(InternalKieContainer kieContainer)
setKieContainer in interface InternalKnowledgeBasepublic InternalKieContainer getKieContainer()
public RuleUnitDescriptionRegistry getRuleUnitDescriptionRegistry()
getRuleUnitDescriptionRegistry in interface InternalKnowledgeBasepublic boolean hasUnits()
hasUnits in interface InternalKnowledgeBasepublic List<AsyncReceiveNode> getReceiveNodes()
getReceiveNodes in interface InternalKnowledgeBasepublic void addReceiveNode(AsyncReceiveNode node)
addReceiveNode in interface InternalKnowledgeBaseCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.