Class BfInsertArgs
java.lang.Object
io.quarkus.redis.datasource.bloom.BfInsertArgs
- All Implemented Interfaces:
RedisCommandExtraArguments
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncapacity
(long capacity) Specifies the desired capacity for the filter to be created.errorRate
(double errorRate) Specifies the error ratio of the newly created filter if it does not yet exist.expansion
(int expansion) Set the expansion factory.nocreate()
Indicates that the filter should not be created if it does not already exist.Prevents the filter from creating additional sub-filters if initial capacity is reached.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
-
Constructor Details
-
BfInsertArgs
public BfInsertArgs()
-
-
Method Details
-
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
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
Indicates that the filter should not be created if it does not already exist.- Returns:
- the current
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
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
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-