Class Node

  • All Implemented Interfaces:, java.lang.AutoCloseable

    public abstract class Node
    extends java.lang.Object
    A node represent a node within a cluster ( The client() can be used in order to use a Client to perform actions/operations against the cluster.
    • Field Detail


        public static final Setting<java.lang.Boolean> WRITE_PORTS_FILE_SETTING

        public static final Setting<java.lang.Boolean> NODE_DATA_SETTING

        public static final Setting<java.lang.Boolean> NODE_MASTER_SETTING

        public static final Setting<java.lang.Boolean> NODE_INGEST_SETTING

        public static final Setting<java.lang.Boolean> NODE_LOCAL_STORAGE_SETTING
        controls whether the node is allowed to persist things like metadata to disk Note that this does not control whether the node stores actual indices (see NODE_DATA_SETTING). However, if this is false, NODE_DATA_SETTING and NODE_MASTER_SETTING must also be false.

        public static final Setting<java.lang.String> NODE_NAME_SETTING

        public static final Setting<java.lang.String> BREAKER_TYPE_KEY
    • Constructor Detail

      • Node

        public Node​(Settings preparedSettings)
        Constructs a node with the given settings.
        preparedSettings - Base settings to configure the node with
      • Node

        protected Node​(Environment environment,
                       java.util.Collection<java.lang.Class<? extends Plugin>> classpathPlugins,
                       boolean forbidPrivateIndexSettings)
        Constructs a node
        environment - the environment for this node
        classpathPlugins - the plugins to be loaded from the classpath
        forbidPrivateIndexSettings - whether or not private index settings are forbidden when creating an index; this is used in the test framework for tests that rely on being able to set private settings
    • Method Detail

      • settings

        public Settings settings()
        The settings that are used by this node. Contains original settings as well as additional settings provided by plugins.
      • client

        public Client client()
        A client that can be used to execute actions (operations) against the cluster.
      • getEnvironment

        public Environment getEnvironment()
        Returns the environment of the node
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
      • isClosed

        public boolean isClosed()
        Returns true if the node is closed.
      • validateNodeBeforeAcceptingRequests

        protected void validateNodeBeforeAcceptingRequests​(BootstrapContext context,
                                                           BoundTransportAddress boundTransportAddress,
                                                           java.util.List<BootstrapCheck> bootstrapChecks)
                                                    throws NodeValidationException
        Hook for validating the node after network services are started but before the cluster service is started and before the network service starts accepting incoming network requests.
        context - the bootstrap context for this node
        boundTransportAddress - the network addresses the node is bound and publishing to
      • registerDerivedNodeNameWithLogger

        protected abstract void registerDerivedNodeNameWithLogger​(java.lang.String nodeName)
        If the node name was derived from the node id this is called with the node name as soon as it is available so that we can register the node name with the logger. If the node name defined in elasticsearch.yml this is never called.