@NotThreadSafe public final class StampsSync extends Sync.Abstract
Instances of this class can be used to prepare store queries on arbitrary time stamps.
Sync.Abstract
CRONTAB_PARAM, ELAPSED_PARAM, OFFSET_PARAM, STAMP_PARAM, TIME_ZONE_PARAM
Constructor and Description |
---|
StampsSync()
Constructs an instance.
|
StampsSync(DateTime[] stamps)
Constructs an instance.
|
StampsSync(DateTime[] stamps,
ZoneId zoneId)
Constructs an instance.
|
StampsSync(String[] stampStrings)
Constructs an instance.
|
StampsSync(String[] stamps,
ZoneId zoneId)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
Sync |
copy()
Creates a copy of this.
|
boolean |
equals(Object other) |
TimeInterval |
getDefaultLimits()
Gets the default limits.
|
Optional<DateTime> |
getNextStamp()
Gets the next time stamp.
|
Optional<DateTime> |
getPreviousStamp()
Gets the previous time stamp.
|
int |
hashCode() |
boolean |
isInSync()
Asks if the current time stamp is in sync.
|
void |
readExternal(ObjectInput input) |
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, getFirstStamp, getLastStamp, getLimits, getNextStamp, getNextStamp, getNextStamp, getPreviousStamp, getPreviousStamp, getPreviousStamp, getThisLogger, getZoneId, isBounded, isInSync, iterator, iterator, nextStamp, previousStamp, reverseIterator, reverseIterator, seed, setCurrentStamp, setLimits, setZoneId
public StampsSync()
Needed for dynamic instantiation.
public StampsSync(DateTime[] stamps)
stamps
- The time stamps.public StampsSync(String[] stampStrings)
stampStrings
- Time stamp strings (ISO 8601).public StampsSync(@Nonnull DateTime[] stamps, @Nonnull ZoneId zoneId)
stamps
- The time stamps.zoneId
- The zone id.public StampsSync(@Nonnull String[] stamps, @Nonnull ZoneId zoneId)
stamps
- The time stamps (ISO 8601).zoneId
- The zone id.public Sync copy()
public boolean equals(Object other)
equals
in class Object
public TimeInterval getDefaultLimits()
getDefaultLimits
in interface Sync
getDefaultLimits
in class Sync.Abstract
public Optional<DateTime> getNextStamp()
public Optional<DateTime> getPreviousStamp()
public int hashCode()
hashCode
in class Object
public boolean isInSync()
public void readExternal(ObjectInput input) throws IOException
readExternal
in interface Externalizable
readExternal
in class Sync.Abstract
IOException
public boolean setUp(Params params)
setUp
in class Sync.Abstract
params
- The sync params.public void tearDown()
tearDown
in class Sync.Abstract
public String toString()
toString
in class Sync.Abstract
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class Sync.Abstract
IOException
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.