Class IndexIdentifier

java.lang.Object
org.apache.cassandra.index.sai.utils.IndexIdentifier

public class IndexIdentifier extends Object
This is a simple wrapper around the index identity. Its primary purpose is to isolate classes that only need access to the identity from the main index classes. This is useful in testing but also makes it easier to pass the log message wrapper logMessage(String) to classes that don't need any other information about the index.
  • Field Details

    • keyspaceName

      public final String keyspaceName
    • tableName

      public final String tableName
    • indexName

      public final String indexName
  • Constructor Details

    • IndexIdentifier

      public IndexIdentifier(String keyspaceName, String tableName, String indexName)
  • Method Details

    • logMessage

      public String logMessage(String message)
      A helper method for constructing consistent log messages for specific column indexes.

      Example: For the index "idx" in keyspace "ks" on table "tb", calling this method with the raw message "Flushing new index segment..." will produce...

      "[ks.tb.idx] Flushing new index segment..."

      Parameters:
      message - The raw content of a logging message, without information identifying it with an index.
      Returns:
      A log message with the proper keyspace, table and index name prepended to it.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object