@Override public ScheduledFuture<?> schedule(final Runnable command, final TimeValue timeValue) throws RejectedExecutionException { Args.notNull(command, "Runnable"); Args.notNull(timeValue, "Time value"); return executorService.schedule(command, timeValue.getDuration(), timeValue.getTimeUnit()); }
public static boolean isPositive(final TimeValue timeValue) { return timeValue != null && timeValue.getDuration() > 0; }
public static boolean isNonNegative(final TimeValue timeValue) { return timeValue != null && timeValue.getDuration() >= 0; }
public static boolean isPositive(final TimeValue timeValue) { return timeValue != null && timeValue.getDuration() > 0; }
public static boolean isNonNegative(final TimeValue timeValue) { return timeValue != null && timeValue.getDuration() >= 0; }
@Override public ScheduledFuture<?> schedule(final Runnable command, final TimeValue timeValue) throws RejectedExecutionException { Args.notNull(command, "Runnable"); Args.notNull(timeValue, "Time value"); return executorService.schedule(command, timeValue.getDuration(), timeValue.getTimeUnit()); }
public void awaitTermination(final TimeValue waitTime) throws InterruptedException { Args.notNull(waitTime, "Wait time"); this.workerExecutorService.awaitTermination(waitTime.getDuration(), waitTime.getTimeUnit()); }
public void awaitTermination(final TimeValue waitTime) throws InterruptedException { Args.notNull(waitTime, "Wait time"); this.workerExecutorService.awaitTermination(waitTime.getDuration(), waitTime.getTimeUnit()); }