Class ElasticsearchSettings

  • All Implemented Interfaces:
    io.annot8.api.settings.Settings
    Direct Known Subclasses:
    NestedElasticsearchSink.Settings

    public class ElasticsearchSettings
    extends Object
    implements io.annot8.api.settings.Settings
    • Constructor Detail

      • ElasticsearchSettings

        public ElasticsearchSettings()
      • ElasticsearchSettings

        public ElasticsearchSettings​(String hostname,
                                     int port,
                                     String scheme,
                                     String index,
                                     boolean deleteIndex,
                                     boolean forceString)
      • ElasticsearchSettings

        public ElasticsearchSettings​(String hostname,
                                     int port,
                                     String scheme,
                                     String index,
                                     boolean deleteIndex,
                                     boolean forceString,
                                     String username,
                                     String password)
    • Method Detail

      • validate

        public boolean validate()
        Specified by:
        validate in interface io.annot8.api.settings.Settings
      • host

        public org.apache.http.HttpHost host()
      • getHostname

        @Description(value="The hostname of the Elasticsearch server",
                     defaultValue="localhost")
        public String getHostname()
      • setHostname

        public void setHostname​(String hostname)
      • getPort

        @Description(value="The port of the Elasticsearch server",
                     defaultValue="9200")
        public int getPort()
      • setPort

        public void setPort​(int port)
      • getScheme

        @Description(value="The scheme over which to communicate with the Elasticsearch server (e.g. http or https)",
                     defaultValue="http")
        public String getScheme()
      • setScheme

        public void setScheme​(String scheme)
      • getIndex

        @Description(value="The Elasticsearch index to use",
                     defaultValue="baleen")
        public String getIndex()
      • setIndex

        public void setIndex​(String index)
      • isDeleteIndex

        @Description(value="Should the Elasticsearch be deleted when the processor is initialised?",
                     defaultValue="false")
        public boolean isDeleteIndex()
      • setDeleteIndex

        public void setDeleteIndex​(boolean deleteIndex)
      • isForceString

        @Description(value="Should string representations of properties be used rather than the raw Java object?",
                     defaultValue="false")
        public boolean isForceString()
      • setForceString

        public void setForceString​(boolean forceString)
      • getUsername

        @Description("If username and password are provided, then these are used to authenticate the connection to Elasticsearch")
        public String getUsername()
      • setUsername

        public void setUsername​(String username)
      • getPassword

        @Description("If username and password are provided, then these are used to authenticate the connection to Elasticsearch")
        public String getPassword()
      • setPassword

        public void setPassword​(String password)
      • credentials

        public org.apache.http.client.CredentialsProvider credentials()