public static class BaseNode.Builder<T extends BaseNode<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
address |
protected BaseNode.Condition |
condition |
protected int |
port |
protected BaseNode.Type |
type |
protected Integer |
weight |
Constructor and Description |
---|
BaseNode.Builder() |
Modifier and Type | Method and Description |
---|---|
BaseNode.Builder<T> |
address(String address)
Required.
|
BaseNode<T> |
build() |
BaseNode.Builder<T> |
condition(BaseNode.Condition condition)
Required.
|
BaseNode.Builder<T> |
from(T in) |
BaseNode.Builder<T> |
port(int port)
Required.
|
BaseNode.Builder<T> |
type(BaseNode.Type type)
Type of node to add.
|
BaseNode.Builder<T> |
weight(Integer weight)
Weight of node to add.
|
protected String address
protected int port
protected BaseNode.Condition condition
protected BaseNode.Type type
protected Integer weight
public BaseNode.Builder<T> address(String address)
public BaseNode.Builder<T> port(int port)
public BaseNode.Builder<T> condition(BaseNode.Condition condition)
BaseNode.Condition
public BaseNode.Builder<T> type(BaseNode.Type type)
BaseNode.Type
public BaseNode.Builder<T> weight(Integer weight)
Algorithm#WEIGHTED_ROUND_ROBIN
load balancer algorithm mode is
selected, then the user should assign the relevant weight to the node using the weight attribute for
the node. Must be an integer from 1 to 100.public BaseNode.Builder<T> from(T in)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.