Class MockSecureSettings

java.lang.Object
org.elasticsearch.common.settings.MockSecureSettings
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.common.settings.SecureSettings

public class MockSecureSettings extends Object implements org.elasticsearch.common.settings.SecureSettings
A mock implementation of secure settings for tests to use.
  • Constructor Details

    • MockSecureSettings

      public MockSecureSettings()
  • Method Details

    • isLoaded

      public boolean isLoaded()
      Specified by:
      isLoaded in interface org.elasticsearch.common.settings.SecureSettings
    • getSettingNames

      public Set<String> getSettingNames()
      Specified by:
      getSettingNames in interface org.elasticsearch.common.settings.SecureSettings
    • getString

      public org.elasticsearch.common.settings.SecureString getString(String setting)
      Specified by:
      getString in interface org.elasticsearch.common.settings.SecureSettings
    • getFile

      public InputStream getFile(String setting)
      Specified by:
      getFile in interface org.elasticsearch.common.settings.SecureSettings
    • getSHA256Digest

      public byte[] getSHA256Digest(String setting)
      Specified by:
      getSHA256Digest in interface org.elasticsearch.common.settings.SecureSettings
    • setString

      public void setString(String setting, String value)
    • setFile

      public void setFile(String setting, byte[] value)
    • merge

      public void merge(MockSecureSettings secureSettings)
      Merge the given secure settings into this one.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.common.settings.SecureSettings
      Throws:
      IOException
    • clone

      public org.elasticsearch.common.settings.SecureSettings clone()
      Overrides:
      clone in class Object