public static final class TopicPlacement.Replica
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> |
attributes() |
int |
id() |
static TopicPlacement.Replica |
of(int id,
java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> attributes)
Returns a Replica from the id and set of attributes.
|
java.lang.String |
toString() |
public int id()
public java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> attributes()
public java.lang.String toString()
toString
in class java.lang.Object
public static TopicPlacement.Replica of(int id, java.util.Optional<java.util.Map<java.lang.String,java.lang.String>> attributes)
id
- The id of the replicaattributes
- The attributes for the replica.
1. If the value is Optional.empty() then it is expected to match any constraint. This
is useful for offline observers since it is safe to allow them to match any constraint.
2. If the value is Optiona.of(Map.of()) then it is expected to not match any constraint.
3. Otherwise the value is used to match one of the constraints.