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 |
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() |
short |
getTimestamp() |
int |
hashCode() |
int |
index() |
static H2ONode |
intern(java.net.InetAddress ip,
int port) |
int |
ip4() |
boolean |
isClient() |
boolean |
isHealthy() |
boolean |
isHealthy(long now) |
boolean |
isRemovedFromCloud() |
static java.nio.channels.ByteChannel |
openChan(byte tcpType,
SocketChannelFactory socketFactory,
java.net.InetAddress originAddr,
int originPort,
short nodeTimeStamp)
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,
short nodeTimeStamp) |
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) |
java.lang.String |
toDebugString() |
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 final water.H2ONode.H2Okey _key
public final boolean isClient()
public final short getTimestamp()
public final boolean isRemovedFromCloud()
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 self(java.net.InetAddress local)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDebugString()
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 final 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, short nodeTimeStamp) throws java.io.IOException
tcpType
, the type can be either
TCPReceiverThread.TCP_SMALL, TCPReceiverThread.TCP_BIG or
TCPReceiverThread.TCP_EXTERNAL.
In case of TCPReceiverThread.TCP_EXTERNAL, we need to keep in mind that this method is executed in environment
where H2O is not running, but it is just on the classpath so users can establish connection with the external H2O
cluster.
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, short nodeTimeStamp) 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()