water
Class H2ONode
java.lang.Object
water.Iced
water.H2ONode
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, Freezable
public class H2ONode
- extends Iced
- implements java.lang.Comparable
A 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.
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
_unique_idx
public int _unique_idx
_last_heard_from
public long _last_heard_from
_announcedLostContact
public boolean _announcedLostContact
_heartbeat
public volatile HeartBeat _heartbeat
_tcp_readers
public int _tcp_readers
_key
public H2ONode.H2Okey _key
IDX
public static H2ONode[] IDX
TCPS
public static final java.util.concurrent.atomic.AtomicInteger TCPS
H2ONode
public H2ONode()
ip4
public final int ip4()
intern
public static final H2ONode intern(H2ONode.H2Okey key)
intern
public static final H2ONode intern(java.net.InetAddress ip,
int port)
intern
public static final H2ONode intern(int ip,
int port)
write
public AutoBuffer write(AutoBuffer ab)
- Description copied from interface:
Freezable
- Serialize the 'this' object into the AutoBuffer, returning the AutoBuffer.
- Specified by:
write in interface Freezable- Overrides:
write in class Iced
read
public H2ONode read(AutoBuffer ab)
- Description copied from interface:
Freezable
- Deserialize from the AutoBuffer into a pre-existing 'this' object.
- Specified by:
read in interface Freezable- Overrides:
read in class Iced
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo in interface java.lang.Comparable
index
public int index()
getTCPSocket
public java.nio.channels.SocketChannel getTCPSocket()
throws java.io.IOException
- Throws:
java.io.IOException
freeTCPSocket
public void freeTCPSocket(java.nio.channels.SocketChannel sock)
taskPut
public void taskPut(int tnum,
RPC rpc)
taskGet
public RPC taskGet(int tnum)
taskRemove
public void taskRemove(int tnum)
tasks
public java.util.Collection<RPC> tasks()
taskSize
public int taskSize()
nextTaskNum
public int nextTaskNum()