Class ScriptMetadata.Builder

org.elasticsearch.script.ScriptMetadata.Builder
Enclosing class:
ScriptMetadata

public static final class ScriptMetadata.Builder extends
A builder used to modify the currently stored scripts data held within the ClusterState. Scripts can be added or deleted, then built to generate a new of scripts that will be used to update the current ClusterState.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builder​(ScriptMetadata previous)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     id)
    Delete a script from the existing stored scripts based on a user-specified id.
     id, StoredScriptSource source)
    Add a new script to the existing stored scripts based on a user-specified id.

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

  • Method Details

    • storeScript

      public  id, StoredScriptSource source)
      Add a new script to the existing stored scripts based on a user-specified id. If a script with the same id already exists it will be overwritten.
      Parameters:
      id - The user-specified id to use for the look up.
      source - The user-specified stored script data held in StoredScriptSource.
    • deleteScript

      public  id)
      Delete a script from the existing stored scripts based on a user-specified id.
      Parameters:
      id - The user-specified id to use for the look up.
    • build

      public ScriptMetadata build()
      Returns:
      A of scripts.