Class IndexIdentifier


  • public class IndexIdentifier
    extends java.lang.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.
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexIdentifier​(java.lang.String keyspaceName, java.lang.String tableName, java.lang.String indexName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String logMessage​(java.lang.String message)
      A helper method for constructing consistent log messages for specific column indexes.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • keyspaceName

        public final java.lang.String keyspaceName
      • tableName

        public final java.lang.String tableName
      • indexName

        public final java.lang.String indexName
    • Constructor Detail

      • IndexIdentifier

        public IndexIdentifier​(java.lang.String keyspaceName,
                               java.lang.String tableName,
                               java.lang.String indexName)
    • Method Detail

      • logMessage

        public java.lang.String logMessage​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object