public class TSReadParams extends java.lang.Object implements IParams
TS.READ command.
Wire shape: TS.READ key timestamp [BLOCK milliseconds min_count] [MAX_COUNT max_count].
The cursor selects samples whose timestamp is greater than or equal to it, in ascending timestamp
order. It is either a non-negative literal (Unix milliseconds) or one of the sentinels -
(earliest), + (latest existing sample, inclusive) or $ (only samples added after
the call). The sentinels are sent as-is and resolved by the server.
The BLOCK group is all-or-nothing: whenever blocking is requested both
milliseconds and minCount are emitted. BLOCK 0 waits indefinitely.
| Constructor and Description |
|---|
TSReadParams() |
| Modifier and Type | Method and Description |
|---|---|
void |
addParams(CommandArguments args) |
TSReadParams |
block(long milliseconds,
int minCount)
Opt into blocking.
|
TSReadParams |
earliest()
Cursor sentinel
-: no lower bound, read from the earliest sample. |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
isBlocking() |
TSReadParams |
latest()
Cursor sentinel
+: the latest existing sample's timestamp, inclusive. |
TSReadParams |
maxCount(int maxCount)
Reply cap.
|
TSReadParams |
newSamples()
Cursor sentinel
$: the latest sample's timestamp + 1, so only samples added after the
command is received qualify. |
static TSReadParams |
readParams() |
TSReadParams |
timestamp(long timestamp)
Literal cursor: samples with
sample_timestamp >= timestamp qualify. |
public static TSReadParams readParams()
public TSReadParams timestamp(long timestamp)
sample_timestamp >= timestamp qualify. 0 reads
from the beginning. Negative values are rejected by the server.public TSReadParams earliest()
-: no lower bound, read from the earliest sample.public TSReadParams latest()
+: the latest existing sample's timestamp, inclusive. On an empty or
missing series it resolves to 0.public TSReadParams newSamples()
$: the latest sample's timestamp + 1, so only samples added after the
command is received qualify. Meaningful only together with block(long, int); without
blocking it always yields an empty reply.public TSReadParams block(long milliseconds, int minCount)
BLOCK group.milliseconds - maximum wait, non-negative; 0 means wait indefinitelyminCount - unblock threshold, positive; the call returns once this many samples qualifypublic TSReadParams maxCount(int maxCount)
maxCount, the oldest maxCount are
returned so callers can page forward. Omitted means unlimited.maxCount - positive integerpublic boolean isBlocking()
BLOCK group is present, so the command must be issued with
blocking-command connection handlingpublic void addParams(CommandArguments args)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2026. All rights reserved.