public interface ClockProvider
Clock used as the reference for now when
validating the @Future and @Past constraints.
The default implementation will return the current system time. Plugging in custom implementations may be useful for instance in batch applications which need to run with a specific logical date, e.g. with yesterday's date when re-running a failed batch job execution.
Implementations must be safe for access from several threads at the same time.
| Modifier and Type | Method and Description |
|---|---|
Clock |
getClock()
Returns the clock which serves as the reference for
now. |
Clock getClock()
now.now; must not be
nullComments to: bean-validation-dev@eclipse.org.
Copyright © 2019,2020 Eclipse Foundation.
Use is subject to EFSL; this spec is based on material that is licensed under the Apache License, version 2.0.