@NotThreadSafe public final class ElapsedSync extends Sync.Abstract
Instances of this class can be used to prepare store queries on a fixed interval starting from an arbitrary time stamp.
Sync.AbstractCRONTAB_PARAM, ELAPSED_PARAM, OFFSET_PARAM, STAMP_PARAM, TIME_ZONE_PARAM| Constructor and Description |
|---|
ElapsedSync()
Constructs an instance.
|
ElapsedSync(ElapsedTime elapsed,
Optional<ElapsedTime> offset)
Constructs an instance.
|
ElapsedSync(String elapsed,
Optional<String> offset)
Constructs an instance.
|
ElapsedSync(ZoneId zoneId,
ElapsedTime elapsed,
Optional<ElapsedTime> offset)
Constructs an instance.
|
ElapsedSync(ZoneId zoneId,
String elapsed,
Optional<String> offset)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
Sync |
copy()
Creates a copy of this.
|
boolean |
equals(Object object) |
Optional<DateTime> |
getNextStamp()
Gets the next time stamp.
|
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(int intervals)
Gets the previous time stamp separated by a number of intervals.
|
int |
hashCode() |
boolean |
isInSync()
Asks if the current time stamp is in sync.
|
void |
readExternal(ObjectInput input) |
void |
setLimits(TimeInterval limits)
Sets the limits.
|
boolean |
setUp(Params params)
Sets up this sync.
|
void |
tearDown()
Tears down what has been set up.
|
String |
toString() |
void |
writeExternal(ObjectOutput output) |
checkNotFrozen, freeze, getCurrentStamp, getDefaultLimits, getFirstStamp, getLastStamp, getLimits, getNextStamp, getNextStamp, getPreviousStamp, getPreviousStamp, getThisLogger, getZoneId, isBounded, isInSync, iterator, iterator, nextStamp, previousStamp, reverseIterator, reverseIterator, seed, setCurrentStamp, setZoneIdpublic ElapsedSync()
Needed for dynamic instantiation.
public ElapsedSync(@Nonnull
ElapsedTime elapsed,
@Nonnull
Optional<ElapsedTime> offset)
elapsed - An elapsed time.offset - An optional time offset.public ElapsedSync(@Nonnull
String elapsed,
@Nonnull
Optional<String> offset)
elapsed - An elapsed time representation.offset - An optional time offset representation.public ElapsedSync(@Nonnull
ZoneId zoneId,
@Nonnull
ElapsedTime elapsed,
@Nonnull
Optional<ElapsedTime> offset)
zoneId - The zone id.elapsed - An elapsed time.offset - An optional time offset.public ElapsedSync(@Nonnull
ZoneId zoneId,
@Nonnull
String elapsed,
@Nonnull
Optional<String> offset)
zoneId - The zone id.elapsed - An elapsed time representation.offset - A time offset representation.public Sync copy()
public boolean equals(Object object)
equals in class Objectpublic Optional<DateTime> getNextStamp()
public Optional<DateTime> getNextStamp(int intervals)
getNextStamp in interface SyncgetNextStamp in class Sync.Abstractintervals - A number of intervals.public Optional<DateTime> getPreviousStamp()
public Optional<DateTime> getPreviousStamp(int intervals)
getPreviousStamp in interface SyncgetPreviousStamp in class Sync.Abstractintervals - A number of intervals.public int hashCode()
hashCode in class Objectpublic boolean isInSync()
public void readExternal(ObjectInput input)
throws IOException
readExternal in interface ExternalizablereadExternal in class Sync.AbstractIOExceptionpublic void setLimits(TimeInterval limits)
setLimits in interface SyncsetLimits in class Sync.Abstractlimits - The limits.public boolean setUp(Params params)
setUp in class Sync.Abstractparams - The sync params.public void tearDown()
tearDown in class Sync.Abstractpublic String toString()
toString in class Sync.Abstractpublic void writeExternal(ObjectOutput output)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class Sync.AbstractIOExceptionCopyright © 2003-2019 Serge Brisson. All Rights Reserved.