public class Node extends Object implements Closeable
Constructor and Description |
---|
Node(com.google.common.net.HostAndPort hostAndPort,
io.netty.bootstrap.Bootstrap bootstrap) |
Node(Node n) |
Node(SocketAddress address,
io.netty.bootstrap.Bootstrap bootstrap) |
Node(SocketAddress address,
com.google.common.collect.ImmutableList<String> filters,
int weight,
String serviceName,
Protocol proto,
boolean ssl,
io.netty.bootstrap.Bootstrap bootstrap) |
Node(SocketAddress address,
int weight,
io.netty.bootstrap.Bootstrap bootstrap) |
Modifier and Type | Method and Description |
---|---|
void |
addPending(io.netty.channel.Channel channel) |
InetSocketAddress |
address() |
void |
close() |
protected io.netty.channel.EventLoopGroup |
eventLoopGroup() |
SocketAddress |
getAddress() |
com.google.common.collect.ImmutableList<String> |
getFilters() |
Protocol |
getProto() |
String |
getServiceName() |
int |
getWeight() |
boolean |
isAvailable() |
boolean |
isSSL() |
double |
load()
The current load, in units of the active metric.
|
int |
pending()
The number of pending requests to this node.
|
void |
removePending(io.netty.channel.Channel channel) |
io.netty.util.concurrent.Future<Void> |
send(Object message) |
void |
setAvailable(boolean available) |
static InetSocketAddress |
toInetAddress(com.google.common.net.HostAndPort hostAndPort)
.
|
UUID |
token()
A token is a random integer identifying the node.
|
String |
toString() |
public Node(com.google.common.net.HostAndPort hostAndPort, io.netty.bootstrap.Bootstrap bootstrap)
public Node(SocketAddress address, io.netty.bootstrap.Bootstrap bootstrap)
public Node(SocketAddress address, int weight, io.netty.bootstrap.Bootstrap bootstrap)
public Node(SocketAddress address, com.google.common.collect.ImmutableList<String> filters, int weight, String serviceName, Protocol proto, boolean ssl, io.netty.bootstrap.Bootstrap bootstrap)
public Node(Node n)
protected io.netty.channel.EventLoopGroup eventLoopGroup()
public static InetSocketAddress toInetAddress(com.google.common.net.HostAndPort hostAndPort)
public double load()
public int pending()
public UUID token()
public InetSocketAddress address()
public void addPending(io.netty.channel.Channel channel)
public void removePending(io.netty.channel.Channel channel)
public boolean isAvailable()
public void setAvailable(boolean available)
public com.google.common.collect.ImmutableList<String> getFilters()
public int getWeight()
public String getServiceName()
public SocketAddress getAddress()
public Protocol getProto()
public boolean isSSL()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2016. All Rights Reserved.