У меня есть запрос и план выполнения, я хочу сделать его снимок, чтобы восстановить его на стороне получателя и начать выполнение снова.
- Какой формат должен быть отправлен получателю?
- Как восстановить на стороне получателя?
Ниже приведен код, который я взял из репозитория Siddhi.
SiddhiManager siddhiManager = new SiddhiManager();
String query =
"define stream inStream(meta_roomNumber int,meta_temperature double);" +
"from inStream#window(10)[meta_temperature > 50]\n" +
"select *" +
"insert into outStream;";
ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(query);
executionPlanRuntime.start();
SiddhiContext siddhicontext = new SiddhiContext();
context.setSiddhiContext(siddhicontext);
context.setSnapshotService(new SnapshotService(context));
executionPlanRuntime.snapshot();