Esempio n. 1
0
  @Override
  public void rollback(final boolean penalize) {
    for (final List<MockFlowFile> list : transferMap.values()) {
      for (final MockFlowFile flowFile : list) {
        processorQueue.offer(flowFile);
      }
    }

    for (final Long flowFileId : beingProcessed) {
      final MockFlowFile flowFile = originalVersions.get(flowFileId);
      if (flowFile != null) {
        processorQueue.offer(flowFile);
      }
    }

    rolledback = true;
    beingProcessed.clear();
    currentVersions.clear();
    originalVersions.clear();
    transferMap.clear();
    clearTransferState();
  }
 @Override
 public void clearTransferState() {
   for (final MockProcessSession session : sessionFactory.getCreatedSessions()) {
     session.clearTransferState();
   }
 }