public final class LoadBalances extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends IServer> |
commonHash(com.github.houbb.hash.api.IHashCode hashCode)
普通 Hash
|
static <T extends IServer> |
consistentHash(com.github.houbb.hash.api.IHashCode hashCode)
一致性 Hash
|
static <T extends IServer> |
random()
随机
|
static <T extends IServer> |
roundRobbin()
轮训
|
static <T extends IServer> |
weightRoundRobbin()
权重轮训
|
public static <T extends IServer> ILoadBalance<T> random()
public static <T extends IServer> ILoadBalance<T> roundRobbin()
public static <T extends IServer> ILoadBalance<T> weightRoundRobbin()
public static <T extends IServer> ILoadBalance<T> commonHash(com.github.houbb.hash.api.IHashCode hashCode)
hashCode - 哈希策略public static <T extends IServer> ILoadBalance<T> consistentHash(com.github.houbb.hash.api.IHashCode hashCode)
hashCode - 哈希策略Copyright © 2022. All rights reserved.