Skip to content

Commit

Permalink
Added stream serialization logic for new min/max file descriptors
Browse files Browse the repository at this point in the history
Relates to elastic#4681
  • Loading branch information
bleskes committed Jan 10, 2014
1 parent e979f9c commit 861e44f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,21 @@ public void readFrom(StreamInput in) throws IOException {
count = in.readVInt();
cpuPercent = in.readVInt();
totalOpenFileDescriptors = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_0_90_10)) {
minOpenFileDescriptors = in.readVLong();
maxOpenFileDescriptors = in.readVLong();
}
}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(count);
out.writeVInt(cpuPercent);
out.writeVLong(totalOpenFileDescriptors);
if (out.getVersion().onOrAfter(Version.V_0_90_10)) {
out.writeVLong(minOpenFileDescriptors);
out.writeVLong(maxOpenFileDescriptors);
}
}

public static ProcessStats readStats(StreamInput in) throws IOException {
Expand Down

0 comments on commit 861e44f

Please sign in to comment.