Class Chooser<K,T>
- java.lang.Object
-
- com.alibaba.nacos.client.naming.utils.Chooser<K,T>
-
public class Chooser<K,T> extends Object
- Author:
- nkorange
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classChooser.Ref<T>
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)Chooser.Ref<T>getRef()KgetUniqueKey()inthashCode()Trandom()TrandomWithWeight()voidrefresh(List<Pair<T>> itemsWithWeight)
-
-
-
Method Detail
-
random
public T random()
-
randomWithWeight
public T randomWithWeight()
-
getUniqueKey
public K getUniqueKey()
-
getRef
public Chooser.Ref<T> getRef()
-
-