Record Class MigrationConfiguration

java.lang.Object
java.lang.Record
org.graylog2.indexer.datanode.MigrationConfiguration
All Implemented Interfaces:
MongoEntity

public record MigrationConfiguration(@Nullable String id, org.joda.time.DateTime created, List<IndexMigrationConfiguration> indices, List<String> certificates, List<LogEntry> logs) extends Record implements MongoEntity
  • Field Details

  • Constructor Details

    • MigrationConfiguration

      public MigrationConfiguration(@Nullable String id, org.joda.time.DateTime created, List<IndexMigrationConfiguration> indices, List<String> certificates, List<LogEntry> logs)
      Creates an instance of a MigrationConfiguration record class.
      Parameters:
      id - the value for the id record component
      created - the value for the created record component
      indices - the value for the indices record component
      certificates - the value for the certificates record component
      logs - the value for the logs record component
  • Method Details

    • forIndices

      public static MigrationConfiguration forIndices(List<String> indices, List<String> trustedCertificates)
      Parameters:
      indices -
      trustedCertificates - PEM encoded list of certificates that the migration should trust
      Returns:
    • getConfigForIndexName

      public Optional<IndexMigrationConfiguration> getConfigForIndexName(String indexName)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @Nullable public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface MongoEntity
      Returns:
      the value of the id record component
    • created

      public org.joda.time.DateTime created()
      Returns the value of the created record component.
      Returns:
      the value of the created record component
    • indices

      public List<IndexMigrationConfiguration> indices()
      Returns the value of the indices record component.
      Returns:
      the value of the indices record component
    • certificates

      public List<String> certificates()
      Returns the value of the certificates record component.
      Returns:
      the value of the certificates record component
    • logs

      public List<LogEntry> logs()
      Returns the value of the logs record component.
      Returns:
      the value of the logs record component