public interface Sync
extends Serializable
This interface is implemented by objects able to synthesize synchronization timestamps.
Modifier and Type | Interface and Description |
---|---|
static class |
Sync.Abstract
Abstract.
|
Modifier and Type | Field and Description |
---|---|
static String |
CRONTAB_PARAM
Specifies a schedule in the format of an extended crontab entry.
|
static String |
ELAPSED_PARAM
Elapsed parameter.
|
static String |
OFFSET_PARAM
Offset parameter.
|
static String |
STAMP_PARAM
Specifies a schedule with time stamps.
|
static String |
TIME_ZONE_PARAM
Specifies a time zone.
|
Modifier and Type | Method and Description |
---|---|
Sync |
copy()
Creates a copy of this.
|
DateTime |
getCurrentStamp()
Gets the current stamp.
|
TimeInterval |
getDefaultLimits()
Gets the default limits.
|
DateTime |
getFirstStamp()
Gets the first stamp.
|
DateTime |
getLastStamp()
Gets the last stamp.
|
TimeInterval |
getLimits()
Gets the limits.
|
Optional<DateTime> |
getNextStamp()
Gets the next time stamp.
|
Optional<DateTime> |
getNextStamp(DateTime stamp)
Gets the next time stamp.
|
Optional<DateTime> |
getNextStamp(DateTime stamp,
int intervals)
Gets the next time stamp separated by a number of intervals.
|
Optional<DateTime> |
getNextStamp(int intervals)
Gets the next time stamp separated by a number of intervals.
|
Optional<DateTime> |
getPreviousStamp()
Gets the previous time stamp.
|
Optional<DateTime> |
getPreviousStamp(DateTime stamp)
Gets the previous time stamp.
|
Optional<DateTime> |
getPreviousStamp(DateTime stamp,
int intervals)
Gets the previous time stamp separated by a number of intervals.
|
Optional<DateTime> |
getPreviousStamp(int intervals)
Gets the previous time stamp separated by a number of intervals.
|
boolean |
isBounded()
Returns true if the limits are inside BoT to EoT.
|
boolean |
isInSync()
Asks if the current time stamp is in sync.
|
boolean |
isInSync(DateTime stamp)
Asks if the reference time stamp is in sync.
|
ListIterator<DateTime> |
iterator()
Returns an iterator.
|
ListIterator<DateTime> |
iterator(DateTime stamp)
Returns an iterator.
|
ListIterator<DateTime> |
reverseIterator()
Returns a reverse iterator.
|
ListIterator<DateTime> |
reverseIterator(DateTime stamp)
Returns a reverse iterator.
|
void |
seed(DateTime stamp)
Seeds the time stamp.
|
void |
setLimits(TimeInterval limits)
Sets the limits.
|
static final String CRONTAB_PARAM
static final String ELAPSED_PARAM
static final String OFFSET_PARAM
static final String STAMP_PARAM
static final String TIME_ZONE_PARAM
@Nonnull @CheckReturnValue Sync copy()
@Nonnull @CheckReturnValue DateTime getCurrentStamp()
@Nonnull @CheckReturnValue TimeInterval getDefaultLimits()
@Nonnull @CheckReturnValue DateTime getFirstStamp()
@Nonnull @CheckReturnValue DateTime getLastStamp()
@Nonnull @CheckReturnValue TimeInterval getLimits()
@Nonnull @CheckReturnValue Optional<DateTime> getNextStamp()
@Nonnull @CheckReturnValue Optional<DateTime> getNextStamp(@Nonnull DateTime stamp)
stamp
- The reference time stamp.@Nonnull @CheckReturnValue Optional<DateTime> getNextStamp(int intervals)
intervals
- A number of intervals.@Nonnull @CheckReturnValue Optional<DateTime> getNextStamp(@Nonnull DateTime stamp, int intervals)
stamp
- The reference time stamp.intervals
- A number of intervals.@Nonnull @CheckReturnValue Optional<DateTime> getPreviousStamp()
@Nonnull @CheckReturnValue Optional<DateTime> getPreviousStamp(@Nonnull DateTime stamp)
stamp
- The reference time stamp.@Nonnull @CheckReturnValue Optional<DateTime> getPreviousStamp(int intervals)
intervals
- A number of intervals.@Nonnull @CheckReturnValue Optional<DateTime> getPreviousStamp(@Nonnull DateTime stamp, int intervals)
stamp
- The reference time stamp.intervals
- A number of intervals.@CheckReturnValue boolean isBounded()
@CheckReturnValue boolean isInSync()
@CheckReturnValue boolean isInSync(@Nonnull DateTime stamp)
stamp
- The reference time stamp.@Nonnull @CheckReturnValue ListIterator<DateTime> iterator()
@Nonnull @CheckReturnValue ListIterator<DateTime> iterator(@Nonnull DateTime stamp)
stamp
- The initial stamp.@Nonnull @CheckReturnValue ListIterator<DateTime> reverseIterator()
@Nonnull @CheckReturnValue ListIterator<DateTime> reverseIterator(@Nonnull DateTime stamp)
stamp
- The initial stamp.void seed(@Nonnull DateTime stamp)
stamp
- The time stamp.void setLimits(@Nonnull TimeInterval limits)
limits
- The limits.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.