@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); license = in.readOptionalWriteable(SearchGuardLicense::new); modules = new HashSet<>(in.readList(ModuleInfo::new)); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeOptionalWriteable(license); out.writeList(new LinkedList<>(modules)); }
/** * Lazily build and get a map of Node ID to node response. * * @return Never {@code null}. Can be empty. * @see #getNodes() */ public Map<String, TNodeResponse> getNodesMap() { if (nodesMap == null) { nodesMap = new HashMap<>(); for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().getId(), nodeResponse); } } return nodesMap; }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); updatedConfigTypes = in.readStringArray(); message = in.readOptionalString(); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeStringArray(updatedConfigTypes); out.writeOptionalString(message); }
NodeEntry<T> nodeEntry = cache.get(response.getNode().getId()); if (nodeEntry != null) { if (nodeEntry.getFetchingRound() != fetchingRound) {
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); storeFilesMetaData = StoreFilesMetaData.readStoreFilesMetaData(in); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(hotThreads); } }
/** * Lazily build and get a map of Node ID to node response. * * @return Never {@code null}. Can be empty. * @see #getNodes() */ public Map<String, TNodeResponse> getNodesMap() { if (nodesMap == null) { nodesMap = new HashMap<>(); for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().getId(), nodeResponse); } } return nodesMap; }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); hotThreads = in.readString(); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); storeFilesMetaData.writeTo(out); }
/** * Lazily build and get a map of Node ID to node response. * * @return Never {@code null}. Can be empty. * @see #getNodes() */ public Map<String, TNodeResponse> getNodesMap() { if (nodesMap == null) { nodesMap = new HashMap<>(); for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().getId(), nodeResponse); } } return nodesMap; }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); if (in.readBoolean()) { reloadException = in.readException(); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); if (status != null) { out.writeVInt(status.size()); for (Map.Entry<Snapshot, Map<ShardId, SnapshotIndexShardStatus>> entry : status.entrySet()) { entry.getKey().writeTo(out); out.writeVInt(entry.getValue().size()); for (Map.Entry<ShardId, SnapshotIndexShardStatus> shardEntry : entry.getValue().entrySet()) { shardEntry.getKey().writeTo(out); shardEntry.getValue().writeTo(out); } } } else { out.writeVInt(0); } } }
/** * Lazily build and get a map of Node ID to node response. * * @return Never {@code null}. Can be empty. * @see #getNodes() */ public Map<String, TNodeResponse> getNodesMap() { if (nodesMap == null) { nodesMap = new HashMap<>(); for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().getId(), nodeResponse); } } return nodesMap; }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); if (in.readBoolean()) { metaData = MetaData.readFrom(in); } }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeLong(timestamp); out.writeLong(sinceTime); out.writeGenericValue(restUsage); }
public Map<String, TNodeResponse> getNodesMap() { if (nodesMap == null) { nodesMap = Maps.newHashMap(); for (TNodeResponse nodeResponse : nodes) { nodesMap.put(nodeResponse.getNode().id(), nodeResponse); } } return nodesMap; }
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); int numberOfSnapshots = in.readVInt(); Map<Snapshot, Map<ShardId, SnapshotIndexShardStatus>> snapshotMapBuilder = new HashMap<>(numberOfSnapshots); for (int i = 0; i < numberOfSnapshots; i++) { Snapshot snapshot = new Snapshot(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(snapshot, unmodifiableMap(shardMapBuilder)); } status = unmodifiableMap(snapshotMapBuilder); }
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); if (reloadException != null) { out.writeBoolean(true); out.writeException(reloadException); } else { out.writeBoolean(false); } }