public boolean isExpired(Calendar fromDate){
  Calendar endTime=(Calendar)fromDate.clone();
  if (window == null) {
    endTime.add(Calendar.HOUR_OF_DAY,INFINITE_WINDOW_ORDER_EXECUTION_TIMEOUT);
  }
 else {
    endTime.add(getWindowLengthCalendarField(),window.getExecutionWindowLength());
  }
  Calendar currTime=Calendar.getInstance();
  log.debug("currTime:{}, endTime: {}",currTime,endTime);
  return currTime.compareTo(endTime) > 0;
}

public boolean isExpired ( Calendar fromDate ) { Calendar endTime = ( Calendar ) fromDate . clone ( ) ; if ( window == null ) { endTime . add ( Calendar . HOUR_OF_DAY , INFINITE_WINDOW_ORDER_EXECUTION_TIMEOUT ) ; } else { endTime . add ( getWindowLengthCalendarField ( ) , window . getExecutionWindowLength ( ) ) ; } Calendar currTime = Calendar . getInstance ( ) ; log . debug ( "currTime:{}, endTime: {}" , currTime , endTime ) ; return currTime . compareTo ( endTime ) > 0 ; }
check if order ' s scheduled time + schedule window already expire .
