congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StreamOutput.writeMap
Code IndexAdd Tabnine to your IDE (free)

How to use
writeMap
method
in
org.elasticsearch.common.io.stream.StreamOutput

Best Java code snippets using org.elasticsearch.common.io.stream.StreamOutput.writeMap (Showing top 20 results out of 315)

origin: floragunncom/search-guard

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeString(name);
  out.writeStringList(new ArrayList<String>(roles));
  out.writeString(requestedTenant);
  out.writeMap(attributes, StreamOutput::writeString, StreamOutput::writeString);
}
origin: org.elasticsearch/elasticsearch

@Override
@SuppressWarnings("unchecked")
public void writeTo(StreamOutput out) throws IOException {
  out.writeMap((Map<String, Object>) (Map) innerMap);
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeMap(this.clientOutgoingConnections, StreamOutput::writeString, StreamOutput::writeLong);
  out.writeMap(this.nodeComputedStats, StreamOutput::writeString, (stream, stats) -> stats.writeTo(stream));
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeMap(ingestDocument.getSourceAndMetadata());
  out.writeMap(ingestDocument.getIngestMetadata());
}
origin: org.elasticsearch/elasticsearch

private static void writeField(StreamOutput out,
            Map<String, FieldCapabilities> map) throws IOException {
  out.writeMap(map, StreamOutput::writeString, (valueOut, fc) -> fc.writeTo(valueOut));
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeLong(lastAllocationId);
  Map<String, PersistentTask<?>> filteredTasks = tasks.values().stream()
    .filter(t -> ClusterState.FeatureAware.shouldSerialize(out, t.getParams()))
    .collect(Collectors.toMap(PersistentTask::getId, Function.identity()));
  out.writeMap(filteredTasks, StreamOutput::writeString, (stream, value) -> value.writeTo(stream));
}
origin: org.elasticsearch/elasticsearch

/**
 * Write a {@link Map} of {@code K}-type keys to {@code V}-type {@link List}s.
 * <pre><code>
 * Map&lt;String, List&lt;String&gt;&gt; map = ...;
 * out.writeMapOfLists(map, StreamOutput::writeString, StreamOutput::writeString);
 * </code></pre>
 *
 * @param keyWriter The key writer
 * @param valueWriter The value writer
 */
public final <K, V> void writeMapOfLists(final Map<K, List<V>> map, final Writer<K> keyWriter, final Writer<V> valueWriter)
    throws IOException {
  writeMap(map, keyWriter, (stream, list) -> {
    writeVInt(list.size());
    for (final V value : list) {
      valueWriter.write(this, value);
    }
  });
}
origin: org.elasticsearch/elasticsearch

@Override
public final void writeTo(StreamOutput out) throws IOException {
  out.writeString(name);
  factoriesBuilder.writeTo(out);
  out.writeMap(metaData);
  doWriteTo(out);
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  out.writeString(indexName);
  out.writeMap(responseMap,
    StreamOutput::writeString, (valueOut, fc) -> fc.writeTo(valueOut));
}
origin: org.elasticsearch/elasticsearch

@Override
public final void writeTo(StreamOutput out) throws IOException {
  out.writeString(name);
  out.writeStringArray(bucketsPaths);
  out.writeMap(metaData);
  doWriteTo(out);
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeString(name);
  out.writeStringArray(bucketsPaths);
  out.writeMap(metaData);
  doWriteTo(out);
}
origin: org.elasticsearch/elasticsearch

  @Override
  public void writeTo(StreamOutput out) throws IOException {
    totalStats.writeTo(out);
    if (typeStats == null || typeStats.isEmpty()) {
      out.writeBoolean(false);
    } else {
      out.writeBoolean(true);
      out.writeMap(typeStats, StreamOutput::writeString, (stream, stats) -> stats.writeTo(stream));
    }
  }
}
origin: org.elasticsearch/elasticsearch

@Override
protected void doWriteTo(StreamOutput out) throws IOException {
  out.writeVInt(sources.size());
  for (CompositeValuesSourceBuilder<?> builder : sources) {
    CompositeValuesSourceParserHelper.writeTo(builder, out);
  }
  out.writeVInt(size);
  out.writeBoolean(after != null);
  if (after != null) {
    out.writeMap(after);
  }
}
origin: org.elasticsearch/elasticsearch

  @Override
  public void writeTo(StreamOutput out) throws IOException {
    totalStats.writeTo(out);
    out.writeVLong(openContexts);
    if (groupStats == null || groupStats.isEmpty()) {
      out.writeBoolean(false);
    } else {
      out.writeBoolean(true);
      out.writeMap(groupStats, StreamOutput::writeString, (stream, stats) -> stats.writeTo(stream));
    }
  }
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  out.writeMap(responseMap, StreamOutput::writeString, FieldCapabilitiesResponse::writeField);
  if (out.getVersion().onOrAfter(Version.V_5_5_0)) {
    out.writeList(indexResponses);
  }
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  out.writeVLong(clusterStateVersion);
  out.writeMap(checkpoints, (streamOutput, s) -> out.writeString(s), (streamOutput, cps) -> cps.writeTo(out));
  IndexShardRoutingTable.Builder.writeTo(routingTable, out);
}
origin: org.elasticsearch/elasticsearch

@Override
protected void doWriteTo(StreamOutput out) throws IOException {
  out.writeOptionalWriteable(initScript);
  out.writeOptionalWriteable(mapScript);
  out.writeOptionalWriteable(combineScript);
  out.writeOptionalWriteable(reduceScript);
  boolean hasParams = params != null;
  out.writeBoolean(hasParams);
  if (hasParams) {
    out.writeMap(params);
  }
}
origin: org.elasticsearch/elasticsearch

@Override
protected final void doWriteTo(StreamOutput out) throws IOException {
  if (serializeTargetValueType()) {
    out.writeOptionalWriteable(targetValueType);
  }
  out.writeMap(fields, StreamOutput::writeString, (o, value) -> value.writeTo(o));
  out.writeOptionalWriteable(valueType);
  out.writeOptionalString(format);
  innerWriteTo(out);
}
origin: org.elasticsearch/elasticsearch

/**
 * Writes a {@link StoredScriptSource} to a stream.  Version 5.3+ will write
 * all of the lang, source, and options parameters.  For versions prior to 5.3,
 * only the source parameter will be read in as a bytes reference.
 */
@Override
public void writeTo(StreamOutput out) throws IOException {
  if (out.getVersion().onOrAfter(Version.V_5_3_0)) {
    out.writeString(lang);
    out.writeString(source);
    @SuppressWarnings("unchecked")
    Map<String, Object> options = (Map<String, Object>)(Map)this.options;
    out.writeMap(options);
  } else {
    out.writeBytesReference(new BytesArray(source));
  }
}
origin: org.elasticsearch/elasticsearch

@Override
public void writeTo(StreamOutput out) throws IOException {
  taskId.writeTo(out);
  out.writeString(type);
  out.writeString(action);
  out.writeOptionalString(description);
  out.writeOptionalNamedWriteable(status);
  out.writeLong(startTime);
  out.writeLong(runningTimeNanos);
  out.writeBoolean(cancellable);
  parentTaskId.writeTo(out);
  if (out.getVersion().onOrAfter(Version.V_6_2_0)) {
    out.writeMap(headers, StreamOutput::writeString, StreamOutput::writeString);
  }
}
org.elasticsearch.common.io.streamStreamOutputwriteMap

Javadoc

Write a Map of K-type keys to V-type.
 
Map<String, String> map = ...; 
out.writeMap(map, StreamOutput::writeString, StreamOutput::writeString); 

Popular methods of StreamOutput

  • writeString
  • writeVInt
    Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fe
  • writeBoolean
    Writes a boolean.
  • writeOptionalString
  • writeVLong
    Writes a non-negative long in a variable-length format. Writes between one and ten bytes. Smaller va
  • writeInt
    Writes an int as four bytes.
  • getVersion
    The version of the node on the other side of this stream.
  • writeBytesReference
    Writes the bytes reference, including a length header.
  • writeLong
    Writes a long as eight bytes.
  • writeStringArray
  • writeGenericValue
    Notice: when serialization a map, the stream out map with the stream in map maybe have the different
  • writeOptionalWriteable
  • writeGenericValue,
  • writeOptionalWriteable,
  • writeByte,
  • writeFloat,
  • writeOptionalStreamable,
  • writeOptionalBytesReference,
  • write,
  • writeNamedWriteable,
  • writeStringArrayNullable

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now