public class SUnionCardArgs extends Object implements CompositeArgument
SUnionCardArgs.Builder and chain the method calls: approx().limit(1000).
SUnionCardArgs is a mutable object and instances should be used only once to avoid shared mutable state.
| Modifier and Type | Class and Description |
|---|---|
static class |
SUnionCardArgs.Builder
Builder entry points for
SUnionCardArgs. |
| Constructor and Description |
|---|
SUnionCardArgs() |
| Modifier and Type | Method and Description |
|---|---|
SUnionCardArgs |
approx()
Request an approximate cardinality computed using HyperLogLog instead of the exact cardinality.
|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs. |
SUnionCardArgs |
limit(long limit)
Set the maximum cardinality to return.
|
public SUnionCardArgs approx()
this SUnionCardArgs.public SUnionCardArgs limit(long limit)
limit - the maximum cardinality to return, must not be negative. 0 means no limit.this SUnionCardArgs.IllegalArgumentException - if limit is negative.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgumentCommandArgs.
Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
build in interface CompositeArgumentK - Key type.V - Value type.args - the command arguments, must not be null.Copyright © 2026 lettuce.io. All rights reserved.