@Override
 public void readFrom(StreamInput in) throws IOException {
   super.readFrom(in);
   fromNode = DiscoveryNode.readNode(in);
   indices = new IndexMetaData[in.readVInt()];
   for (int i = 0; i < indices.length; i++) {
     indices[i] = IndexMetaData.Builder.readFrom(in);
   }
 }
 public static DiscoveryNodes readFrom(StreamInput in, @Nullable DiscoveryNode localNode)
     throws IOException {
   Builder builder = new Builder();
   if (in.readBoolean()) {
     builder.masterNodeId(in.readUTF());
   }
   if (localNode != null) {
     builder.localNodeId(localNode.id());
   }
   int size = in.readVInt();
   for (int i = 0; i < size; i++) {
     DiscoveryNode node = DiscoveryNode.readNode(in);
     if (localNode != null && node.id().equals(localNode.id())) {
       // reuse the same instance of our address and local node id for faster equality
       node = localNode;
     }
     builder.put(node);
   }
   return builder.build();
 }
Esempio n. 3
0
 @Override
 public void readFrom(StreamInput in) throws IOException {
   node = DiscoveryNode.readNode(in);
 }
Esempio n. 4
0
 @Override
 public void readFrom(StreamInput in) throws IOException {
   node = DiscoveryNode.readNode(in);
   withClusterState = in.readBoolean();
 }