| 程序包 | 说明 |
|---|---|
| com.hyd.ssdb | |
| com.hyd.ssdb.conf | |
| com.hyd.ssdb.conn | |
| com.hyd.ssdb.sharding |
| 限定符和类型 | 方法和说明 |
|---|---|
static SsdbClient |
SsdbClient.fromClusters(List<Cluster> clusters) |
| 限定符和类型 | 字段和说明 |
|---|---|
protected List<Cluster> |
Sharding.clusters |
| 限定符和类型 | 方法和说明 |
|---|---|
static Cluster |
Cluster.fromServers(List<Server> servers) |
static Cluster |
Cluster.fromServers(Server... servers) |
static Cluster |
Cluster.fromSingleServer(Server server) |
static Cluster |
Cluster.fromSingleServer(String host,
int port) |
static Cluster |
Cluster.fromSingleServer(String host,
int port,
int timeoutSeconds) |
static Cluster |
Cluster.fromSingleServer(String host,
int port,
int timeoutSeconds,
int bufferSize) |
static Cluster |
Cluster.fromSingleServer(String host,
int port,
String pass) |
static Cluster |
Cluster.fromSingleServer(String host,
int port,
String pass,
int timeoutSeconds,
int bufferSize) |
Cluster |
Sharding.getClusterById(String id) |
abstract Cluster |
Sharding.getClusterByKey(String key)
根据 key 获取所对应的 Cluster
|
Cluster |
Cluster.getHashHostingCluster(int hash)
返回指定 hash 所属的 Cluster
|
Cluster |
Cluster.getTakenOverBy() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Cluster> |
Sharding.getClusters() |
static List<Cluster> |
Cluster.toClusters(List<Server> servers) |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract boolean |
Sharding.clusterFailed(Cluster invalidCluster)
当某个 Cluster 下线(即 Cluster 中的所有的服务器都不可用)时的处理(交给子类实现)
ServerMonitorDaemon 会检查下线的服务器,发现有服务器恢复运作的话,会修改对应的
Cluster 状态为上线
|
void |
Cluster.setTakenOverBy(Cluster takenOverBy) |
| 构造器和说明 |
|---|
Sharding(Cluster cluster)
构造方法
|
| 构造器和说明 |
|---|
Sharding(List<Cluster> clusters)
构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
ServerMonitorDaemon.addInvalidServer(Server server,
Cluster cluster)
添加一个要进行监视的无效服务器
|
| 限定符和类型 | 方法和说明 |
|---|---|
Cluster |
ConsistentHashSharding.getClusterByKey(String key) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ConsistentHashSharding.addCluster(Cluster newCluster,
Cluster prevCluster)
添加一个 Cluster
|
boolean |
ConsistentHashSharding.clusterFailed(Cluster invalidCluster) |
| 构造器和说明 |
|---|
ConsistentHashSharding(Cluster... clusters) |
ConsistentHashSharding(Cluster cluster) |
| 构造器和说明 |
|---|
ConsistentHashSharding(List<Cluster> clusters) |
Copyright © 2019. All rights reserved.