Package org.apache.cassandra.io.sstable
Class Component
- java.lang.Object
-
- org.apache.cassandra.io.sstable.Component
-
public class Component extends java.lang.ObjectSSTables are made up of multiple components in separate files. Components are identified by a type and an id, but required unique components (such as the Data and Index files) may have implicit ids assigned to them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classComponent.TypeWARNING: Be careful while changing the names or string representation of the enum members.
-
Field Summary
Fields Modifier and Type Field Description static ComponentCOMPRESSION_INFOstatic ComponentCRCstatic ComponentDATAstatic ComponentDIGESTstatic ComponentFILTERinthashCodejava.lang.Stringnamestatic ComponentPRIMARY_INDEXstatic charseparatorstatic ComponentSTATSstatic ComponentSUMMARYstatic ComponentTOCComponent.Typetype
-
Constructor Summary
Constructors Constructor Description Component(Component.Type type)Component(Component.Type type, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.Stringname()static Componentparse(java.lang.String name)Parse the component part of a sstable filename into aComponentobject.java.lang.StringtoString()
-
-
-
Field Detail
-
separator
public static final char separator
- See Also:
- Constant Field Values
-
DATA
public static final Component DATA
-
PRIMARY_INDEX
public static final Component PRIMARY_INDEX
-
FILTER
public static final Component FILTER
-
COMPRESSION_INFO
public static final Component COMPRESSION_INFO
-
STATS
public static final Component STATS
-
DIGEST
public static final Component DIGEST
-
CRC
public static final Component CRC
-
SUMMARY
public static final Component SUMMARY
-
TOC
public static final Component TOC
-
type
public final Component.Type type
-
name
public final java.lang.String name
-
hashCode
public final int hashCode
-
-
Constructor Detail
-
Component
public Component(Component.Type type)
-
Component
public Component(Component.Type type, java.lang.String name)
-
-
Method Detail
-
name
public java.lang.String name()
- Returns:
- The unique (within an sstable) name for this component.
-
parse
public static Component parse(java.lang.String name)
Parse the component part of a sstable filename into aComponentobject.- Parameters:
name- a string representing a sstable component.- Returns:
- the component corresponding to
name. Note that this always return a component as an unrecognized name is parsed into a CUSTOM component.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-