Interface TransactionalTimeSeriesCommands<K>
- Type Parameters:
K
- the type of the key
- All Superinterfaces:
TransactionalRedisCommands
- All Known Implementing Classes:
BlockingTransactionalTimeSeriesCommandsImpl
Allows executing commands from the
time series
group (requires the Redis Time Series module from Redis stack).
See the time series command list for further information
about these commands.
This API is intended to be used in a Redis transaction (MULTI
), thus, all command methods return void
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Execute the command TS.ADD.void
Execute the command TS.ADD.void
Execute the command TS.ADD.void
Execute the command TS.ALTER.void
Execute the command TS.CREATE.void
tsCreate
(K key, CreateArgs args) Execute the command TS.CREATE.void
tsCreateRule
(K key, K destKey, Aggregation aggregation, Duration bucketDuration) Execute the command TS.CREATERULE.void
tsCreateRule
(K key, K destKey, Aggregation aggregation, Duration bucketDuration, long alignTimestamp) Execute the command TS.CREATERULE.void
Execute the command TS.DECRBY.void
tsDecrBy
(K key, double value, IncrementArgs args) Execute the command TS.DECRBY.void
Execute the command TS.DEL.void
tsDeleteRule
(K key, K destKey) Execute the command TS.DELETERULE.void
Execute the command TS.GET.void
Execute the command TS.GET.void
Execute the command TS.INCRBY.void
tsIncrBy
(K key, double value, IncrementArgs args) Execute the command TS.INCRBY.void
tsMAdd
(SeriesSample<K>... samples) Execute the command TS.MADD.void
Execute the command TS.MGET.void
Execute the command TS.MGET.void
tsMRange
(TimeSeriesRange range, Filter... filters) Execute the command TS.MRANGE.void
tsMRange
(TimeSeriesRange range, MRangeArgs args, Filter... filters) Execute the command TS.MRANGE.void
tsMRevRange
(TimeSeriesRange range, Filter... filters) Execute the command TS.MREVRANGE.void
tsMRevRange
(TimeSeriesRange range, MRangeArgs args, Filter... filters) Execute the command TS.MREVRANGE.void
tsQueryIndex
(Filter... filters) Execute the command TS.QUERYINDEX.void
tsRange
(K key, TimeSeriesRange range) Execute the command TS.RANGE.void
tsRange
(K key, TimeSeriesRange range, RangeArgs args) Execute the command TS.RANGE.void
tsRevRange
(K key, TimeSeriesRange range) Execute the command TS.REVRANGE.void
tsRevRange
(K key, TimeSeriesRange range, RangeArgs args) Execute the command TS.REVRANGE.Methods inherited from interface io.quarkus.redis.datasource.TransactionalRedisCommands
getDataSource
-
Method Details
-
tsCreate
Execute the command TS.CREATE. Summary: Create a new time series Group: time series- Parameters:
key
- the key name for the time series must not benull
args
- the creation arguments.
-
tsCreate
Execute the command TS.CREATE. Summary: Create a new time series Group: time series- Parameters:
key
- the key name for the time series must not benull
-
tsAdd
Execute the command TS.ADD. Summary: Append a sample to a time series Group: time series- Parameters:
key
- the key name for the time series must not benull
timestamp
- the (long) UNIX sample timestamp in milliseconds or-1
to set the timestamp according to the server clock.value
- the numeric data value of the sample.args
- the creation arguments.
-
tsAdd
Execute the command TS.ADD. Summary: Append a sample to a time series Group: time series- Parameters:
key
- the key name for the time series, must not benull
timestamp
- the (long) UNIX sample timestamp in millisecondsvalue
- the numeric data value of the sample
-
tsAdd
Execute the command TS.ADD. Summary: Append a sample to a time series Group: time seriesUnlike
tsAdd(Object, long, double)
, set the timestamp according to the server clock.- Parameters:
key
- the key name for the time series. must not benull
value
- the numeric data value of the sample, must not benull
-
tsAlter
Execute the command TS.ALTER. Summary: Update the retention, chunk size, duplicate policy, and labels of an existing time series Group: time series- Parameters:
key
- the key name for the time series, must not benull
args
- the alter parameters, must not benull
-
tsCreateRule
Execute the command TS.CREATERULE. Summary: Create a compaction rule Group: time series- Parameters:
key
- the key name for the time series, must not benull
destKey
- the key name for destination (compacted) time series. It must be created before TS.CREATERULE is called. Must not benull
.aggregation
- the aggregation function, must not benull
bucketDuration
- the duration of each bucket, must not benull
-
tsCreateRule
void tsCreateRule(K key, K destKey, Aggregation aggregation, Duration bucketDuration, long alignTimestamp) Execute the command TS.CREATERULE. Summary: Create a compaction rule Group: time series- Parameters:
key
- the key name for the time series, must not benull
destKey
- the key name for destination (compacted) time series. It must be created before TS.CREATERULE is called. Must not benull
.aggregation
- the aggregation function, must not benull
bucketDuration
- the duration of each bucket, must not benull
alignTimestamp
- when set, ensures that there is a bucket that starts exactly at alignTimestamp and aligns all other buckets accordingly. It is expressed in milliseconds. The default value is 0 aligned with the epoch. For example, if bucketDuration is 24 hours (24 * 3600 * 1000), setting alignTimestamp to 6 hours after the epoch (6 * 3600 * 1000) ensures that each bucket’s timeframe is [06:00 .. 06:00).
-
tsDecrBy
Execute the command TS.DECRBY. Summary: Decrease the value of the sample with the maximum existing timestamp, or create a new sample with a value equal to the value of the sample with the maximum existing timestamp with a given decrement Group: time series- Parameters:
key
- the key name for the time series. must not benull
value
- the numeric data value of the sample, must not benull
-
tsDecrBy
Execute the command TS.DECRBY. Summary: Decrease the value of the sample with the maximum existing timestamp, or create a new sample with a value equal to the value of the sample with the maximum existing timestamp with a given decrement Group: time series- Parameters:
key
- the key name for the time series. must not benull
value
- the numeric data value of the sample, must not benull
args
- the extra command parameters
-
tsDel
Execute the command TS.DEL. Summary: Delete all samples between two timestamps for a given time series Group: time seriesThe given timestamp interval is closed (inclusive), meaning that samples whose timestamp equals the fromTimestamp or toTimestamp are also deleted.
- Parameters:
key
- the key name for the time series. must not benull
fromTimestamp
- the start timestamp for the range deletion.toTimestamp
- the end timestamp for the range deletion.
-
tsDeleteRule
Execute the command TS.DELETERULE. Summary: Delete a compaction rule Group: time series- Parameters:
key
- the key name for the time series. must not benull
destKey
- the key name for destination (compacted) time series. Note that the command does not delete the compacted series. Must not benull
-
tsGet
Execute the command TS.GET. Summary: Get the last sample Group: time series- Parameters:
key
- the key name for the time series. must not benull
-
tsGet
Execute the command TS.GET. Summary: Get the last sample Group: time series- Parameters:
key
- the key name for the time series. must not benull
latest
- used when a time series is a compaction. With LATEST set totrue
, TS.MRANGE also reports the compacted value of the latest possibly partial bucket, given that this bucket's start time falls within [fromTimestamp, toTimestamp]. Without LATEST, TS.MRANGE does not report the latest possibly partial bucket. When a time series is not a compaction, LATEST is ignored.
-
tsIncrBy
Execute the command TS.INCRBY. Summary: Increase the value of the sample with the maximum existing timestamp, or create a new sample with a value equal to the value of the sample with the maximum existing timestamp with a given increment. Group: time series- Parameters:
key
- the key name for the time series. must not benull
value
- the numeric data value of the sample, must not benull
-
tsIncrBy
Execute the command TS.INCRBY. Summary: Increase the value of the sample with the maximum existing timestamp, or create a new sample with a value equal to the value of the sample with the maximum existing timestamp with a given increment. Group: time series- Parameters:
key
- the key name for the time series. must not benull
value
- the numeric data value of the sample, must not benull
args
- the extra command parameters
-
tsMAdd
Execute the command TS.MADD. Summary: Append new samples to one or more time series Group: time series- Parameters:
samples
- the set of samples to add to the time series.
-
tsMGet
Execute the command TS.MGET. Summary: Get the last samples matching a specific filter Group: time series- Parameters:
args
- the extra command parameter, must not benull
filters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsMGet
Execute the command TS.MGET. Summary: Get the last samples matching a specific filter Group: time series- Parameters:
filters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsMRange
Execute the command TS.MRANGE. Summary: Query a range across multiple time series by filters in forward direction Group: time series- Parameters:
range
- the range, must not benull
filters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsMRange
Execute the command TS.MRANGE. Summary: Query a range across multiple time series by filters in forward direction Group: time series- Parameters:
range
- the range, must not benull
args
- the extra command parametersfilters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsMRevRange
Execute the command TS.MREVRANGE. Summary: Query a range across multiple time series by filters in reverse direction Group: time series- Parameters:
range
- the range, must not benull
filters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsMRevRange
Execute the command TS.MREVRANGE. Summary: Query a range across multiple time series by filters in reverse direction Group: time series- Parameters:
range
- the range, must not benull
args
- the extra command parametersfilters
- the filters. Instanced are created using the static methods fromFilter
. Must not benull
, or contain anull
value.
-
tsQueryIndex
Execute the command TS.QUERYINDEX. Summary: Get all time series keys matching a filter list Group: time series- Parameters:
filters
- the filter, created from theFilter
class. Must not benull
, must not containnull
-
tsRange
Execute the command TS.RANGE. Summary: Query a range in forward direction Group: time series- Parameters:
key
- the key name for the time series, must not benull
range
- the range, must not benull
-
tsRange
Execute the command TS.RANGE. Summary: Query a range in forward direction Group: time series- Parameters:
key
- the key name for the time series, must not benull
range
- the range, must not benull
args
- the extra command parameters
-
tsRevRange
Execute the command TS.REVRANGE. Summary: Query a range in reverse direction Group: time series- Parameters:
key
- the key name for the time series, must not benull
range
- the range, must not benull
-
tsRevRange
Execute the command TS.REVRANGE. Summary: Query a range in reverse direction Group: time series- Parameters:
key
- the key name for the time series, must not benull
range
- the range, must not benull
args
- the extra command parameters
-