/** * Returns the timestamp at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.EXACT_TIMESTAMP} * @see #ofReadTimestamp(Timestamp) */ public Timestamp getReadTimestamp() { checkMode(Mode.READ_TIMESTAMP); return timestamp; }
/** * Returns the minimum timestamp at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.MIN_READ_TIMESTAMP} * @see #ofMinReadTimestamp(Timestamp) */ public Timestamp getMinReadTimestamp() { checkMode(Mode.MIN_READ_TIMESTAMP); return timestamp; }
/** * Returns the exact staleness, in the units requested, at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.EXACT_STALENESS} * @see #ofExactStaleness(long, java.util.concurrent.TimeUnit) */ public long getExactStaleness(TimeUnit units) { checkMode(Mode.EXACT_STALENESS); return durationToUnits(staleness, units); }
/** * Returns the maximum staleness, in the units requested, at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.MAX_STALENESS} * @see #ofMaxStaleness(long, java.util.concurrent.TimeUnit) */ public long getMaxStaleness(TimeUnit units) { checkMode(Mode.MAX_STALENESS); return durationToUnits(staleness, units); }
/** * Returns the timestamp at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.EXACT_TIMESTAMP} * @see #ofReadTimestamp(Timestamp) */ public Timestamp getReadTimestamp() { checkMode(Mode.READ_TIMESTAMP); return timestamp; }
/** * Returns the minimum timestamp at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.MIN_READ_TIMESTAMP} * @see #ofMinReadTimestamp(Timestamp) */ public Timestamp getMinReadTimestamp() { checkMode(Mode.MIN_READ_TIMESTAMP); return timestamp; }
/** * Returns the exact staleness, in the units requested, at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.EXACT_STALENESS} * @see #ofExactStaleness(long, java.util.concurrent.TimeUnit) */ public long getExactStaleness(TimeUnit units) { checkMode(Mode.EXACT_STALENESS); return durationToUnits(staleness, units); }
/** * Returns the maximum staleness, in the units requested, at which reads will be performed. * * @throws IllegalStateException if {@code mode() != Mode.MAX_STALENESS} * @see #ofMaxStaleness(long, java.util.concurrent.TimeUnit) */ public long getMaxStaleness(TimeUnit units) { checkMode(Mode.MAX_STALENESS); return durationToUnits(staleness, units); }