congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NamedWriteableRegistry$Entry
Code IndexAdd Tabnine to your IDE (free)

How to use
NamedWriteableRegistry$Entry
in
org.elasticsearch.common.io.stream

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

origin: org.elasticsearch/elasticsearch

public static List<Entry> getNamedWriteables() {
  List<Entry> entries = new ArrayList<>();
  // Cluster State
  registerClusterCustom(entries, SnapshotsInProgress.TYPE, SnapshotsInProgress::new, SnapshotsInProgress::readDiffFrom);
  registerClusterCustom(entries, RestoreInProgress.TYPE, RestoreInProgress::new, RestoreInProgress::readDiffFrom);
  registerClusterCustom(entries, SnapshotDeletionsInProgress.TYPE, SnapshotDeletionsInProgress::new,
    SnapshotDeletionsInProgress::readDiffFrom);
  // Metadata
  registerMetaDataCustom(entries, RepositoriesMetaData.TYPE, RepositoriesMetaData::new, RepositoriesMetaData::readDiffFrom);
  registerMetaDataCustom(entries, IngestMetadata.TYPE, IngestMetadata::new, IngestMetadata::readDiffFrom);
  registerMetaDataCustom(entries, ScriptMetaData.TYPE, ScriptMetaData::new, ScriptMetaData::readDiffFrom);
  registerMetaDataCustom(entries, IndexGraveyard.TYPE, IndexGraveyard::new, IndexGraveyard::readDiffFrom);
  registerMetaDataCustom(entries, PersistentTasksCustomMetaData.TYPE, PersistentTasksCustomMetaData::new,
    PersistentTasksCustomMetaData::readDiffFrom);
  // Task Status (not Diffable)
  entries.add(new Entry(Task.Status.class, PersistentTasksNodeService.Status.NAME, PersistentTasksNodeService.Status::new));
  return entries;
}
origin: apache/servicemix-bundles

/**
 * Register a new ValueFormat.
 */
private void registerValueFormat(String name, Writeable.Reader<? extends DocValueFormat> reader) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(DocValueFormat.class, name, reader));
}
origin: apache/servicemix-bundles

private void registerScoreFunction(ScoreFunctionSpec<?> scoreFunction) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(
      ScoreFunctionBuilder.class, scoreFunction.getName().getPreferredName(), scoreFunction.getReader()));
  // TODO remove funky contexts
  namedXContents.add(new NamedXContentRegistry.Entry(
      ScoreFunctionBuilder.class, scoreFunction.getName(),
      (XContentParser p, Object c) -> scoreFunction.getParser().fromXContent(p)));
}
origin: apache/servicemix-bundles

private void registerQuery(QuerySpec<?> spec) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(QueryBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
  namedXContents.add(new NamedXContentRegistry.Entry(QueryBuilder.class, spec.getName(),
      (p, c) -> spec.getParser().fromXContent(p)));
}
origin: apache/servicemix-bundles

private void registerSignificanceHeuristic(SearchExtensionSpec<SignificanceHeuristic, SignificanceHeuristicParser> heuristic) {
  significanceHeuristicParserRegistry.register(heuristic.getParser(), heuristic.getName());
  namedWriteables.add(new NamedWriteableRegistry.Entry(SignificanceHeuristic.class, heuristic.getName().getPreferredName(),
      heuristic.getReader()));
}
origin: apache/servicemix-bundles

public static void registerSmoothingModels(List<Entry> namedWriteables) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, Laplace.NAME, Laplace::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, LinearInterpolation.NAME, LinearInterpolation::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, StupidBackoff.NAME, StupidBackoff::new));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private void registerSearchExt(SearchExtSpec<?> spec) {
  namedXContents.add(new NamedXContentRegistry.Entry(SearchExtBuilder.class, spec.getName(), spec.getParser()));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SearchExtBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
}
origin: apache/servicemix-bundles

private void registerBuiltinWritables() {
  namedWritables.add(new NamedWriteableRegistry.Entry(Condition.class, MaxAgeCondition.NAME, MaxAgeCondition::new));
  namedWritables.add(new NamedWriteableRegistry.Entry(Condition.class, MaxDocsCondition.NAME, MaxDocsCondition::new));
  namedWritables.add(new NamedWriteableRegistry.Entry(Condition.class, MaxSizeCondition.NAME, MaxSizeCondition::new));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public static void registerSmoothingModels(List<Entry> namedWriteables) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, Laplace.NAME, Laplace::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, LinearInterpolation.NAME, LinearInterpolation::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SmoothingModel.class, StupidBackoff.NAME, StupidBackoff::new));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private void registerRescorer(RescorerSpec<?> spec) {
  if (false == transportClient) {
    namedXContents.add(new NamedXContentRegistry.Entry(RescorerBuilder.class, spec.getName(), (p, c) -> spec.getParser().apply(p)));
  }
  namedWriteables.add(new NamedWriteableRegistry.Entry(RescorerBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
}
origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Register a new ValueFormat.
 */
private void registerValueFormat(String name, Writeable.Reader<? extends DocValueFormat> reader) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(DocValueFormat.class, name, reader));
}
origin: com.strapdata.elasticsearch/elasticsearch

private void registerSorts() {
  namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, GeoDistanceSortBuilder.NAME, GeoDistanceSortBuilder::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, ScoreSortBuilder.NAME, ScoreSortBuilder::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, ScriptSortBuilder.NAME, ScriptSortBuilder::new));
  namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, FieldSortBuilder.NAME, FieldSortBuilder::new));
}
origin: com.strapdata.elasticsearch/elasticsearch

  public static void register(List<Entry> namedWriteables) {
    namedWriteables.add(new Entry(ShapeBuilder.class, PointBuilder.TYPE.shapeName(), PointBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, CircleBuilder.TYPE.shapeName(), CircleBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, EnvelopeBuilder.TYPE.shapeName(), EnvelopeBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, MultiPointBuilder.TYPE.shapeName(), MultiPointBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, LineStringBuilder.TYPE.shapeName(), LineStringBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, MultiLineStringBuilder.TYPE.shapeName(), MultiLineStringBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, PolygonBuilder.TYPE.shapeName(), PolygonBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, MultiPolygonBuilder.TYPE.shapeName(), MultiPolygonBuilder::new));
    namedWriteables.add(new Entry(ShapeBuilder.class, GeometryCollectionBuilder.TYPE.shapeName(), GeometryCollectionBuilder::new));
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

private static <T extends NamedWriteable> void registerCustom(List<Entry> entries, Class<T> category, String name,
                               Reader<? extends T> reader, Reader<NamedDiff> diffReader) {
  entries.add(new Entry(category, name, reader));
  entries.add(new Entry(NamedDiff.class, name, diffReader));
}
origin: apache/servicemix-bundles

private static <T extends NamedWriteable> void registerCustom(List<Entry> entries, Class<T> category, String name,
                               Reader<? extends T> reader, Reader<NamedDiff> diffReader) {
  entries.add(new Entry(category, name, reader));
  entries.add(new Entry(NamedDiff.class, name, diffReader));
}
origin: apache/servicemix-bundles

private void registerSuggester(SuggesterSpec<?> suggester) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(
      SuggestionBuilder.class, suggester.getName().getPreferredName(), suggester.getReader()));
  namedXContents.add(new NamedXContentRegistry.Entry(SuggestionBuilder.class, suggester.getName(),
      suggester.getParser()));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private void registerQuery(QuerySpec<?> spec) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(QueryBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
  namedXContents.add(new NamedXContentRegistry.Entry(QueryBuilder.class, spec.getName(),
      (p, c) -> spec.getParser().fromXContent(p)));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private void registerScoreFunction(ScoreFunctionSpec<?> scoreFunction) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(
      ScoreFunctionBuilder.class, scoreFunction.getName().getPreferredName(), scoreFunction.getReader()));
  // TODO remove funky contexts
  namedXContents.add(new NamedXContentRegistry.Entry(
      ScoreFunctionBuilder.class, scoreFunction.getName(),
      (XContentParser p, Object c) -> scoreFunction.getParser().fromXContent(p)));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

private static <T extends NamedWriteable> void registerCustom(List<Entry> entries, Class<T> category, String name,
                               Reader<? extends T> reader, Reader<NamedDiff> diffReader) {
  entries.add(new Entry(category, name, reader));
  entries.add(new Entry(NamedDiff.class, name, diffReader));
}
origin: com.strapdata.elasticsearch/elasticsearch

private void registerQuery(QuerySpec<?> spec) {
  namedWriteables.add(new NamedWriteableRegistry.Entry(QueryBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
  // Using Optional here is fairly horrible, but in master we don't have to because the builders return QueryBuilder.
  namedXContents.add(new NamedXContentRegistry.Entry(Optional.class, spec.getName(),
      (XContentParser p, Object c) -> (Optional) spec.getParser().fromXContent((QueryParseContext) c)));
}
org.elasticsearch.common.io.streamNamedWriteableRegistry$Entry

Javadoc

An entry in the registry, made up of a category class and name, and a reader for that category class.

Most used methods

  • <init>
    Creates a new entry which can be stored by the registry.

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • String (java.lang)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Best IntelliJ plugins
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