可以的。不过你在声明MapStateDescriptor的时候要用 GenericTypeInfo了,并且会有一定的性能损失。
Best,
Guowei
On Tue, Nov 17, 2020 at 11:55 AM Lei Wang wrote:
> 下面的业务逻辑
>
> robot 传感器上报的信息,先按 robotId keyBy,之后要遍历很多的规则。每个规则存储一个之前的对象,实现如下:
>
> private transient MapState state;
>
> for (Entry entry :
> RulesFactory.getChargerTwoRe
下面的业务逻辑
robot 传感器上报的信息,先按 robotId keyBy,之后要遍历很多的规则。每个规则存储一个之前的对象,实现如下:
private transient MapState state;
for (Entry entry :
RulesFactory.getChargerTwoRecordRules().entrySet()) {
String faultName = entry.getKey();
IChargerTwoRecordRule rule = entry.getValue();
RobotData old = state.ge