java-Drools:insertLogical和收回

这是我先前的question的后续操作.我有以下形式的决策树:

 

我想将其转换为Drools Expert中的规则. insertLogical的使用时间为proposed.Drools文档中关于insertLogical的信息为this

 

insertLogical(new Something()); is
similar to insert, but the object will
be automatically retracted when there
are no more facts to support the truth
of the currently firing rule.

这些对象被收回的事实很有用(因为我在内存中有成千上万个对象,每个对象都会创建一堆这样的对象).还有一个retract(object)方法,可以从工作内存中删除一个对象.当我到达终端节点并删除(缩回)到达该节点的基础对象(遵循决策树)时,它是否还会删除遍历过程中使用insertLogical创建的所有这些临时对象?

最佳答案

根据我的经验,答案是“否”,您指向的唯一对象将从Drools工作内存中收回,而所有跨对象引用都将保留在JVM内存中.如果将对象的引用保留在某个位置,您甚至可以重新注入收回的对象.


Inm小程序商店

 

Inm小程序商店收录了最新,最热门的微信小程序和微信小游戏,是国内内容最丰富的集小程序游戏、小程序分发、小程序推广为一体的综合性小程序门户网站之一。


Vultr中文网

 

最低 $2.5/月 的VPS, 稳定, 可靠

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提示错误[ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.drools:droolsjbpm-integration:7.74.0-SNAPSHOT (D:\droolsjbpm-integration-main\droolsjbpm-integration-main\pom.xml) has 1 error [ERROR] Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav-jackrabbit:1.0-beta-6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1 (absent): Could not transfer artifact commons-httpclient:commons-httpclient:jar:3.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.112.215] failed: connect timed out -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
最新发布
06-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值