public class BaseNode<T extends BaseNode<T>> extends Object implements Comparable<BaseNode<T>>
Modifier and Type | Class and Description |
---|---|
static class |
BaseNode.Builder<T extends BaseNode<T>> |
static class |
BaseNode.Condition
Virtual IP Conditions
|
static class |
BaseNode.Type
Type of node.
|
Modifier and Type | Field and Description |
---|---|
protected String |
address |
protected BaseNode.Condition |
condition |
protected int |
port |
protected BaseNode.Type |
type |
protected Integer |
weight |
Modifier | Constructor and Description |
---|---|
protected |
BaseNode() |
|
BaseNode(String address,
int port,
BaseNode.Condition condition,
BaseNode.Type type,
Integer weight) |
Modifier and Type | Method and Description |
---|---|
static <T extends BaseNode<T>> |
builder() |
int |
compareTo(BaseNode<T> arg0) |
boolean |
equals(Object obj) |
String |
getAddress() |
BaseNode.Condition |
getCondition() |
int |
getPort() |
BaseNode.Type |
getType() |
Integer |
getWeight()
the maximum weight of a node is 100.
|
int |
hashCode() |
protected com.google.common.base.Objects.ToStringHelper |
string() |
BaseNode.Builder<T> |
toBuilder() |
String |
toString() |
protected String address
protected int port
protected BaseNode.Condition condition
protected BaseNode.Type type
protected Integer weight
protected BaseNode()
public BaseNode(String address, int port, BaseNode.Condition condition, BaseNode.Type type, Integer weight)
public String getAddress()
public int getPort()
public BaseNode.Condition getCondition()
public BaseNode.Type getType()
public Integer getWeight()
protected com.google.common.base.Objects.ToStringHelper string()
public static <T extends BaseNode<T>> BaseNode.Builder<T> builder()
public BaseNode.Builder<T> toBuilder()
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.