public class CompositeExecutionTime extends Object implements ExecutionTime
Constructor and Description |
---|
CompositeExecutionTime(List<ExecutionTime> executionTimes) |
Modifier and Type | Method and Description |
---|---|
boolean |
isMatch(java.time.ZonedDateTime date)
Provide feedback if a given date matches the cron expression.
|
Optional<java.time.ZonedDateTime> |
lastExecution(java.time.ZonedDateTime date)
Provide nearest date for last execution.
|
Optional<java.time.ZonedDateTime> |
nextExecution(java.time.ZonedDateTime date)
Provide nearest date for next execution.
|
Optional<java.time.Duration> |
timeFromLastExecution(java.time.ZonedDateTime date)
Provide nearest time from last execution.
|
Optional<java.time.Duration> |
timeToNextExecution(java.time.ZonedDateTime date)
Provide nearest time for next execution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forCron
public CompositeExecutionTime(List<ExecutionTime> executionTimes)
public Optional<java.time.ZonedDateTime> nextExecution(java.time.ZonedDateTime date)
ExecutionTime
nextExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.Duration> timeToNextExecution(java.time.ZonedDateTime date)
ExecutionTime
timeToNextExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.ZonedDateTime> lastExecution(java.time.ZonedDateTime date)
ExecutionTime
lastExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public Optional<java.time.Duration> timeFromLastExecution(java.time.ZonedDateTime date)
ExecutionTime
timeFromLastExecution
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.public boolean isMatch(java.time.ZonedDateTime date)
ExecutionTime
isMatch
in interface ExecutionTime
date
- - ZonedDateTime instance. If null, a NullPointerException will be raised.Copyright © 2020 JBoss by Red Hat. All rights reserved.