Package org.apache.ivory.expression

Examples of org.apache.ivory.expression.ExpressionHelper.evaluate()


  public long getDelay(Frequency delay, Date nominalTime, Date cutOffTime)
      throws IvoryException {
    ExpressionHelper evaluator = ExpressionHelper.get();
    Date now = new Date();
    Date lateTime = nominalTime;
    long delayMilliSeconds = evaluator.evaluate(delay.toString(),
        Long.class);
    int factor = 1;
    // TODO we can get rid of this using formula
    while (lateTime.compareTo(now)<=0) {
      lateTime = addTime(lateTime, (int) (factor * delayMilliSeconds));
 
View Full Code Here


public abstract class AbstractRerunPolicy {

  public long getDurationInMilliSec(Frequency frequency)
      throws IvoryException {
    ExpressionHelper helper = ExpressionHelper.get();
    return helper.evaluate(frequency.toString(), Long.class);

  }

  public static Date addTime(Date date, int milliSecondsToAdd) {
    return new Date(date.getTime() + milliSecondsToAdd);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.