public class LoadBalancer extends Object
| 构造器和说明 |
|---|
LoadBalancer() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends ClientSession> |
getAny(Collection<T> coll,
Supplier<Integer> randomSupplier)
获取任意一个
|
static <T extends ClientSession> |
getAnyByHash(Collection<T> coll,
String diversion)
根据 hash 获取任意一个
|
static <T extends ClientSession> |
getAnyByPoll(Collection<T> coll)
根据 poll 获取任意一个
|
static <T extends ClientSession> |
getFirst(Collection<T> coll)
获取第一个
|
public static <T extends ClientSession> T getAnyByPoll(Collection<T> coll)
public static <T extends ClientSession> T getAnyByHash(Collection<T> coll, String diversion)
public static <T extends ClientSession> T getAny(Collection<T> coll, Supplier<Integer> randomSupplier)
public static <T extends ClientSession> T getFirst(Collection<T> coll)
Copyright © 2024. All rights reserved.