public class CountMinSketch
extends org.redisson.RedissonObject
| 构造器和说明 |
|---|
CountMinSketch(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
CountMinSketch(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
create(double errorRadio,
double probability)
Initializes a Count-Min Sketch.
|
boolean |
create(int width,
int depth)
Initializes a Count-Min Sketch
|
org.redisson.api.RFuture<Boolean> |
createAsync(double errorRadio,
double probability) |
org.redisson.api.RFuture<Boolean> |
createAsync(int width,
int depth) |
CountMinSketchInfo |
getInfo() |
org.redisson.api.RFuture<CountMinSketchInfo> |
getInfoAsync() |
List<Integer> |
incrby(String[] items,
int[] increments)
Increases the count of item by increment.
|
org.redisson.api.RFuture<List<Integer>> |
incrbyAsync(String[] items,
int[] increments) |
boolean |
merge(int keyNum,
String[] srcs,
Integer[] weights)
Merges several sketches into one sketch.
|
org.redisson.api.RFuture<Boolean> |
mergeAsync(int keyNum,
String[] srcs,
Integer[] weights) |
List<Integer> |
query(String... items)
query count for item
|
org.redisson.api.RFuture<List<Integer>> |
queryAsync(String... items) |
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 CountMinSketch(org.redisson.client.codec.Codec codec,
org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public CountMinSketch(org.redisson.command.CommandAsyncExecutor commandExecutor,
String name)
public boolean create(int width,
int depth)
width - Number of counter in each arraydepth - Number of counter-arrayspublic org.redisson.api.RFuture<Boolean> createAsync(int width, int depth)
public boolean create(double errorRadio,
double probability)
errorRadio - Estimate size of error. The error is a percent of total counted itemsprobability - The desired probability for inflated count. This should be a decimal value between 0 and 1public org.redisson.api.RFuture<Boolean> createAsync(double errorRadio, double probability)
public List<Integer> incrby(String[] items, int[] increments)
items - increments - public org.redisson.api.RFuture<List<Integer>> incrbyAsync(String[] items, int[] increments)
public List<Integer> query(String... items)
items - The items which counter to be increasedpublic boolean merge(int keyNum,
String[] srcs,
Integer[] weights)
keyNum - Number of sketches to be mergedsrcs - Names of source sketches to be mergedweights - Multiple of each sketch. Default =1public org.redisson.api.RFuture<Boolean> mergeAsync(int keyNum, String[] srcs, Integer[] weights)
public CountMinSketchInfo getInfo()
public org.redisson.api.RFuture<CountMinSketchInfo> getInfoAsync()
Copyright © 2022. All rights reserved.