Package org.apache.cassandra.schema
Class TableId
java.lang.Object
org.apache.cassandra.schema.TableId
The unique identifier of a table.
This is essentially a UUID, but we wrap it as it's used quite a bit in the code and having a nicely named class make the code more readable.
-
Method Summary
Modifier and TypeMethodDescriptionasUUID()static TableIddeserialize(DataInput in) final booleanstatic TableIdforSystemTable(String keyspace, String table) Creates the UUID of a system table.static TableIdfromString(String idString) static TableIdstatic TableIdgenerate()final inthashCode()voidserialize(DataOutput out) inttableNameAndIdFromFilename(String filename) toString()static TableIdunsafeDeterministic(String keyspace, String table)
-
Method Details
-
fromUUID
-
generate
-
fromString
-
tableNameAndIdFromFilename
-
forSystemTable
Creates the UUID of a system table. This is deterministically based on the table name as system tables are hardcoded and initialized independently on each node (they don't go through a CREATE), but we still want them to have the same ID everywhere. We shouldn't use this for any other table. -
unsafeDeterministic
-
toHexString
-
asUUID
-
hashCode
public final int hashCode() -
equals
-
toString
-
serialize
- Throws:
IOException
-
serializedSize
public int serializedSize() -
deserialize
- Throws:
IOException
-