/* (non-Javadoc) * @see cn.com.rebirth.commons.io.stream.Streamable#writeTo(cn.com.rebirth.commons.io.stream.StreamOutput) */ @Override public void writeTo(StreamOutput out) throws IOException { clusterName.writeTo(out); out.writeVInt(nodes.length); for (DiscoveryNode node : nodes) { node.writeTo(out); } }
/* (non-Javadoc) * @see cn.com.rebirth.commons.io.stream.Streamable#readFrom(cn.com.rebirth.commons.io.stream.StreamInput) */ @Override public void readFrom(StreamInput in) throws IOException { clusterName = ClusterName.readClusterName(in); nodes = new DiscoveryNode[in.readVInt()]; for (int i = 0; i < nodes.length; i++) { nodes[i] = DiscoveryNode.readNode(in); } }