public class TDigest
extends org.redisson.RedissonObject
| 构造器和说明 |
|---|
TDigest(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
TDigest(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
add(List<AbstractMap.SimpleEntry<Double,Double>> vals)
Adds one or more samples to a sketch.
|
org.redisson.api.RFuture<Boolean> |
addAsync(List<AbstractMap.SimpleEntry<Double,Double>> vals) |
boolean |
create(long compression)
Initializes a t-digest with specified parameters
TDIGEST.CREATE t-digest 100
|
org.redisson.api.RFuture<Boolean> |
createAsync(long compression) |
Double |
getCdf(double value)
Returns the fraction of all points added which are <= value.
|
org.redisson.api.RFuture<Double> |
getCdfAsync(double value) |
TDigestInfo |
getInfo()
TDIGEST.INFO {key}
|
org.redisson.api.RFuture<TDigestInfo> |
getInfoAsync() |
Double |
getMax()
Get maximum value from the sketch.
|
org.redisson.api.RFuture<Double> |
getMaxAsync() |
Double |
getMin()
Get minimum value from the sketch.
|
org.redisson.api.RFuture<Double> |
getMinAsync() |
Double |
getQuantile(double quantile)
Returns an estimate of the cutoff such that a specified fraction of the data added to this TDigest would be less than or equal to the cutoff.
|
org.redisson.api.RFuture<Double> |
getQuantileAsync(double quantile) |
boolean |
mergeTo(String toKey)
Merges all of the values from 'this' to 'toKey' sketch.
|
org.redisson.api.RFuture<Boolean> |
mergeToAsync(String toKey) |
boolean |
reset()
Reset the sketch to zero - empty out the sketch and re-initialize it.
|
org.redisson.api.RFuture<Boolean> |
resetAsync() |
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncpublic TDigest(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public TDigest(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public boolean create(long compression)
TDIGEST.CREATE t-digest 100
compression - The compression parameter. 100 is a common value for normal uses. 1000 is extremely large.public org.redisson.api.RFuture<Boolean> createAsync(long compression)
public boolean reset()
TDIGEST.RESET {key}
public org.redisson.api.RFuture<Boolean> resetAsync()
public boolean add(List<AbstractMap.SimpleEntry<Double,Double>> vals)
TDIGEST.ADD {key} {val} {weight} [ {val} {weight} ] ...
key : The name of the sketch. val : The value to add. weight : The weight of this point.
vals - public org.redisson.api.RFuture<Boolean> addAsync(List<AbstractMap.SimpleEntry<Double,Double>> vals)
public Double getMin()
TDIGEST.MIN {key}
public org.redisson.api.RFuture<Double> getMinAsync()
public Double getMax()
TDIGEST.MAX {key}
public org.redisson.api.RFuture<Double> getMaxAsync()
public Double getQuantile(double quantile)
TDIGEST.QUANTILE {key} {quantile}
public org.redisson.api.RFuture<Double> getQuantileAsync(double quantile)
public Double getCdf(double value)
TDIGEST.CDF {key} {value}
value - public org.redisson.api.RFuture<Double> getCdfAsync(double value)
public boolean mergeTo(String toKey)
toKey - public TDigestInfo getInfo()
public org.redisson.api.RFuture<TDigestInfo> getInfoAsync()
Copyright © 2022. All rights reserved.