@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); int n = in.readVInt(); snapshotIds = new SnapshotId[n]; for (int i = 0; i < n; i++) { snapshotIds[i] = SnapshotId.readSnapshotId(in); } }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); int numberOfSnapshots = in.readVInt(); Map<SnapshotId, Map<ShardId, SnapshotIndexShardStatus>> snapshotMapBuilder = new HashMap<>(numberOfSnapshots); for (int i = 0; i < numberOfSnapshots; i++) { SnapshotId snapshotId = SnapshotId.readSnapshotId(in); int numberOfShards = in.readVInt(); Map<ShardId, SnapshotIndexShardStatus> shardMapBuilder = new HashMap<>(numberOfShards); for (int j = 0; j < numberOfShards; j++) { ShardId shardId = ShardId.readShardId(in); SnapshotIndexShardStatus status = SnapshotIndexShardStatus.readShardSnapshotStatus(in); shardMapBuilder.put(shardId, status); } snapshotMapBuilder.put(snapshotId, unmodifiableMap(shardMapBuilder)); } status = unmodifiableMap(snapshotMapBuilder); }