Class BfInsertArgs
- java.lang.Object
-
- io.quarkus.redis.datasource.bloom.BfInsertArgs
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class BfInsertArgs extends Object implements RedisCommandExtraArguments
-
-
Constructor Summary
Constructors Constructor Description BfInsertArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BfInsertArgs
capacity(long capacity)
Specifies the desired capacity for the filter to be created.BfInsertArgs
errorRate(double errorRate)
Specifies the error ratio of the newly created filter if it does not yet exist.BfInsertArgs
expansion(int expansion)
Set the expansion factory.BfInsertArgs
nocreate()
Indicates that the filter should not be created if it does not already exist.BfInsertArgs
nonScaling()
Prevents the filter from creating additional sub-filters if initial capacity is reached.List<String>
toArgs()
-
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
-
capacity
public BfInsertArgs capacity(long capacity)
Specifies the desired capacity for the filter to be created. This parameter is ignored if the filter already exists. If the filter is automatically created and this parameter is absent, then the module-level capacity is used.- Parameters:
capacity
- the capacity- Returns:
- the current
BfInsertArgs
-
errorRate
public BfInsertArgs errorRate(double errorRate)
Specifies the error ratio of the newly created filter if it does not yet exist. If the filter is automatically created and error is not specified then the module-level error rate is used.- Parameters:
errorRate
- the error rate, must be between 0 and 1.- Returns:
- the current
BfInsertArgs
-
nocreate
public BfInsertArgs nocreate()
Indicates that the filter should not be created if it does not already exist.- Returns:
- the current
BfInsertArgs
-
nonScaling
public BfInsertArgs nonScaling()
Prevents the filter from creating additional sub-filters if initial capacity is reached. Non-scaling filters requires slightly less memory than their scaling counterparts. The filter returns an error when capacity is reached.- Returns:
- the current
BfInsertArgs
-
expansion
public BfInsertArgs expansion(int expansion)
Set the expansion factory. When capacity is reached, an additional sub-filter is created. The size of the new sub-filter is the size of the last sub-filter multiplied by expansion. If the number of elements to be stored in the filter is unknown, we recommend that you use an expansion of 2 or more to reduce the number of sub-filters. Otherwise, we recommend that you use an expansion of 1 to reduce memory consumption. The default expansion value is 2.- Parameters:
expansion
- the expansion factor, must be positive- Returns:
- the current
BfInsertArgs
-
toArgs
public List<String> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments, encoded as a list of String.
-
-