public final class H2ONode extends Iced<H2ONode> implements java.lang.Comparable
Node
in an H2O
Cloud.
Basically a worker-bee with CPUs, Memory and Disk.
One of this is the self-Node, but the rest are remote Nodes.Modifier and Type | Field and Description |
---|---|
HeartBeat |
_heartbeat |
water.H2ONode.H2Okey |
_key |
long |
_last_heard_from |
boolean |
_removed_from_cloud |
int |
_tcp_readers |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getIpPortString() |
H2OSecurityManager |
getSecurityManager() |
SocketChannelFactory |
getSocketFactory() |
int |
hashCode() |
int |
index() |
static H2ONode |
intern(byte[] bs,
int off) |
static H2ONode |
intern(java.net.InetAddress ip,
int port) |
int |
ip4() |
boolean |
isHealthy() |
boolean |
isHealthy(long now) |
static java.nio.channels.ByteChannel |
openChan(byte tcpType,
SocketChannelFactory socketFactory,
java.net.InetAddress originAddr,
int originPort)
Returns a new connection of type
tcpType , the type can be either
TCPReceiverThread.TCP_SMALL, TCPReceiverThread.TCP_BIG or
TCPReceiverThread.TCP_EXTERNAL. |
static java.nio.channels.ByteChannel |
openChan(byte tcpType,
SocketChannelFactory socketFactory,
java.lang.String originAddr,
int originPort) |
H2ONode |
read_impl(AutoBuffer ab) |
H2ONode |
readJSON_impl(AutoBuffer ab) |
static H2ONode |
self(java.net.InetAddress local) |
void |
sendMessage(java.nio.ByteBuffer bb,
byte msg_priority) |
void |
stopSendThread() |
java.lang.String |
toString() |
AutoBuffer |
write_impl(AutoBuffer ab) |
AutoBuffer |
writeJSON_impl(AutoBuffer ab) |
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public transient long _last_heard_from
public transient volatile HeartBeat _heartbeat
public transient int _tcp_readers
public boolean _removed_from_cloud
public final water.H2ONode.H2Okey _key
public void stopSendThread()
public java.lang.String getIpPortString()
public final int ip4()
public boolean isHealthy()
public boolean isHealthy(long now)
public static H2ONode intern(java.net.InetAddress ip, int port)
public static H2ONode intern(byte[] bs, int off)
public static H2ONode self(java.net.InetAddress local)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int index()
public void sendMessage(java.nio.ByteBuffer bb, byte msg_priority)
public static java.nio.channels.ByteChannel openChan(byte tcpType, SocketChannelFactory socketFactory, java.net.InetAddress originAddr, int originPort) throws java.io.IOException
tcpType
, the type can be either
TCPReceiverThread.TCP_SMALL, TCPReceiverThread.TCP_BIG or
TCPReceiverThread.TCP_EXTERNAL.
If socket channel factory is set, the communication will considered to be secured - this depends on the
configuration of the SocketChannelFactory
. In case of the factory is null, the communication won't be secured.java.io.IOException
public static java.nio.channels.ByteChannel openChan(byte tcpType, SocketChannelFactory socketFactory, java.lang.String originAddr, int originPort) throws java.io.IOException
java.io.IOException
public final AutoBuffer write_impl(AutoBuffer ab)
public final H2ONode read_impl(AutoBuffer ab)
public final AutoBuffer writeJSON_impl(AutoBuffer ab)
public final H2ONode readJSON_impl(AutoBuffer ab)
public SocketChannelFactory getSocketFactory()
public H2OSecurityManager getSecurityManager()