我有Task,它从服务器获取结果。在将数据存储到bolt的.continueWith
中的数据库时,它被"立即完成"(在调试周期中发现)打断。
this.someMethod.getStatements()
.continueWith(new Continuation<List<Statement>, Object>() {
@Override public Object then(Task<List<Statement>> task) {
for (Statement statement : task.getResult()) {
saveStatement(statement);
}
return null;
}
});
找到解决方案时,内部方法存在问题,该方法将数据存储到数据库中。