Class IncrementArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.timeseries.IncrementArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class IncrementArgs extends Object implements RedisCommandExtraArguments
Represents the extra arguments of thets.decrby
andtx.incrby
commands.
-
-
Constructor Summary
Constructors Constructor Description IncrementArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IncrementArgs
chunkSize(int size)
Sets memory size, in bytes, allocated for each data chunk.IncrementArgs
label(String label, Object value)
Set a label-value pairs that represent metadata labels of the time series.IncrementArgs
setRetention(Duration retention)
Set the maximum retention period, compared to the maximum existing timestamp, in milliseconds.IncrementArgs
setTimestamp(long value)
Set (integer) UNIX sample timestamp in milliseconds.List<Object>
toArgs()
IncrementArgs
uncompressed()
Changes data storage from compressed (default) to uncompressed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
setTimestamp
public IncrementArgs setTimestamp(long value)
Set (integer) UNIX sample timestamp in milliseconds.timestamp must be equal to or higher than the maximum existing timestamp. When equal, the value of the sample with the maximum existing timestamp is decreased. If it is higher, a new sample with a timestamp set to timestamp is created, and its value is set to the value of the sample with the maximum existing timestamp minus value.
If the time series is empty, the value is set to
value
.When not specified, the timestamp is set according to the server clock.
- Parameters:
value
- the value- Returns:
- the current
IncrementArgs
-
setRetention
public IncrementArgs setRetention(Duration retention)
Set the maximum retention period, compared to the maximum existing timestamp, in milliseconds.Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.
- Parameters:
retention
- the retention, must not benull
- Returns:
- the current
IncrementArgs
-
uncompressed
public IncrementArgs uncompressed()
Changes data storage from compressed (default) to uncompressed.Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series
- Returns:
- the current
IncrementArgs
-
chunkSize
public IncrementArgs chunkSize(int size)
Sets memory size, in bytes, allocated for each data chunk. Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.- Parameters:
size
- the chunk size, between 48 and 1048576- Returns:
- the current
IncrementArgs
-
label
public IncrementArgs label(String label, Object value)
Set a label-value pairs that represent metadata labels of the time series.- Parameters:
label
- the label, must not benull
value
- the value, must not benull
- Returns:
- the current
IncrementArgs
-
toArgs
public List<Object> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-
-