Class BlockingTransactionalTopKCommandsImpl<K,V>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractTransactionalRedisCommandGroup
-
- io.quarkus.redis.runtime.datasource.BlockingTransactionalTopKCommandsImpl<K,V>
-
- All Implemented Interfaces:
TransactionalTopKCommands<K,V>,TransactionalRedisCommands
public class BlockingTransactionalTopKCommandsImpl<K,V> extends AbstractTransactionalRedisCommandGroup implements TransactionalTopKCommands<K,V>
-
-
Field Summary
-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractTransactionalRedisCommandGroup
ds, timeout
-
-
Constructor Summary
Constructors Constructor Description BlockingTransactionalTopKCommandsImpl(TransactionalRedisDataSource ds, ReactiveTransactionalTopKCommands<K,V> reactive, Duration timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtopkAdd(K key, V item)Execute the command TOPK.ADD.voidtopkAdd(K key, V... items)Execute the command TOPK.ADD.voidtopkIncrBy(K key, Map<V,Integer> couples)Execute the command TOPK.INCRBY.voidtopkIncrBy(K key, V item, int increment)Execute the command TOPK.INCRBY.voidtopkList(K key)Execute the command TOPK.LIST.voidtopkListWithCount(K key)Execute the command TOPK.LIST.voidtopkQuery(K key, V item)Execute the command TOPK.QUERY.voidtopkQuery(K key, V... items)Execute the command TOPK.QUERY.voidtopkReserve(K key, int topk)Execute the command TOPK.RESERVE.voidtopkReserve(K key, int topk, int width, int depth, double decay)Execute the command TOPK.RESERVE.-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractTransactionalRedisCommandGroup
getDataSource
-
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.TransactionalRedisCommands
getDataSource
-
-
-
-
Constructor Detail
-
BlockingTransactionalTopKCommandsImpl
public BlockingTransactionalTopKCommandsImpl(TransactionalRedisDataSource ds, ReactiveTransactionalTopKCommands<K,V> reactive, Duration timeout)
-
-
Method Detail
-
topkAdd
public void topkAdd(K key, V item)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.ADD. Summary: Adds an item to the data structure. Multiple items can be added at once. If an item enters the Top-K list, the item which is expelled is returned. This allows dynamic heavy-hitter detection of items being entered or expelled from Top-K list. Group: top-k- Specified by:
topkAddin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list where item is added, must not benullitem- the item to add, must not benull
-
topkAdd
public void topkAdd(K key, V... items)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.ADD. Summary: Adds an item to the data structure. Multiple items can be added at once. If an item enters the Top-K list, the item which is expelled is returned. This allows dynamic heavy-hitter detection of items being entered or expelled from Top-K list. Group: top-k- Specified by:
topkAddin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list where item is added, must not benullitems- the items to add, must not benull, must not be empty, must not containnull
-
topkIncrBy
public void topkIncrBy(K key, V item, int increment)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.INCRBY. Summary: Increase the score of an item in the data structure by increment. Multiple items' score can be increased at once. If an item enters the Top-K list, the item which is expelled is returned. Group: top-k- Specified by:
topkIncrByin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list where item is added, must not benullitem- the item to add, must not benullincrement- increment to current item score. Increment must be greater or equal to 1. Increment is limited to 100,000 to avoid server freeze.
-
topkIncrBy
public void topkIncrBy(K key, Map<V,Integer> couples)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.INCRBY. Summary: Increase the score of an item in the data structure by increment. Multiple items' score can be increased at once. If an item enters the Top-K list, the item which is expelled is returned. Group: top-k- Specified by:
topkIncrByin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list where item is added, must not benullcouples- The map containing the item / increment, must not benull, must not be empty
-
topkList
public void topkList(K key)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.LIST. Summary: Return full list of items in Top K list. Group: top-k- Specified by:
topkListin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benull
-
topkListWithCount
public void topkListWithCount(K key)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.LIST. Summary: Return full list of items in Top K list. Group: top-k- Specified by:
topkListWithCountin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benull
-
topkQuery
public void topkQuery(K key, V item)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.QUERY. Summary: Checks whether an item is one of Top-K items. Multiple items can be checked at once. Group: top-k- Specified by:
topkQueryin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benullitem- the item to check, must not benull
-
topkQuery
public void topkQuery(K key, V... items)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.QUERY. Summary: Checks whether an item is one of Top-K items. Multiple items can be checked at once. Group: top-k- Specified by:
topkQueryin interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benullitems- the items to check, must not benull, must not containnull, must not be empty
-
topkReserve
public void topkReserve(K key, int topk)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.RESERVE. Summary: Initializes a TopK with specified parameters. Group: top-k- Specified by:
topkReservein interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benulltopk- the number of top occurring items to keep.
-
topkReserve
public void topkReserve(K key, int topk, int width, int depth, double decay)
Description copied from interface:TransactionalTopKCommandsExecute the command TOPK.RESERVE. Summary: Initializes a TopK with specified parameters. Group: top-k- Specified by:
topkReservein interfaceTransactionalTopKCommands<K,V>- Parameters:
key- the name of list, must not benulltopk- the number of top occurring items to keep.width- the number of counters kept in each array. (Default 8)depth- the number of arrays. (Default 7)decay- the probability of reducing a counter in an occupied bucket. It is raised to power of it's counter (decay ^ bucket[i].counter). Therefore, as the counter gets higher, the chance of a reduction is being reduced. (Default 0.9)
-
-