Class IndexIdentifier
- java.lang.Object
-
- org.apache.cassandra.index.sai.utils.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 wrapperlogMessage(String)
to classes that don't need any other information about the index.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
indexName
java.lang.String
keyspaceName
java.lang.String
tableName
-
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()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-