public FlowConstructStatistics(String flowConstructType, String name, int maxThreadSize) {
   super(flowConstructType, name);
   flowStatistics.setEnabled(enabled);
   this.threadPoolSize = maxThreadSize;
   if (this.getClass() == FlowConstructStatistics.class) {
     clear();
   }
 }
  public synchronized void clear() {
    super.clear();

    executionError.set(0);
    fatalError.set(0);
    if (flowStatistics != null) {
      flowStatistics.clear();
    }
  }
 public FlowConstructStatistics(
     String flowConstructType, String name, ProcessingStrategy processingStrategy) {
   super(flowConstructType, name);
   flowStatistics.setEnabled(enabled);
   if (processingStrategy instanceof AsynchronousProcessingStrategy) {
     this.threadPoolSize = ((AsynchronousProcessingStrategy) processingStrategy).getMaxThreads();
   }
   if (this.getClass() == FlowConstructStatistics.class) {
     clear();
   }
 }
 public long getMaxProcessingTime() {
   return flowStatistics.getMaxExecutionTime();
 }
 public long getProcessedEvents() {
   return flowStatistics.getExecutedEvents();
 }
 public long getAverageProcessingTime() {
   return flowStatistics.getAverageExecutionTime();
 }
 public void addFlowExecutionBranchTime(long time, long total) {
   flowStatistics.addExecutionBranchTime(time == total, time, total);
 }
 public void addCompleteFlowExecutionTime(long time) {
   flowStatistics.addCompleteExecutionTime(time);
 }
 /** Enable statistics logs (this is a dynamic parameter) */
 public synchronized void setEnabled(boolean b) {
   super.setEnabled(b);
   flowStatistics.setEnabled(enabled);
 }
 public long getTotalProcessingTime() {
   return flowStatistics.getTotalExecutionTime();
 }