Package org.apache.cassandra.io.sstable
Class Component
- java.lang.Object
-
- org.apache.cassandra.io.sstable.Component
-
public class Component extends java.lang.Object
SSTables 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 class
Component.Type
WARNING: Be careful while changing the names or string representation of the enum members.
-
Field Summary
Fields Modifier and Type Field Description int
hashCode
java.lang.String
name
static char
separator
Component.Type
type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static java.lang.Iterable<Component>
getSingletonsFor(java.lang.Class<? extends SSTableFormat<?,?>> formatClass)
static java.lang.Iterable<Component>
getSingletonsFor(SSTableFormat<?,?> format)
int
hashCode()
boolean
isValidFor(Descriptor descriptor)
java.lang.String
name()
static Component
parse(java.lang.String name, SSTableFormat<?,?> format)
Parse the component part of a sstable filename into aComponent
object.java.lang.String
toString()
-
-
-
Field Detail
-
separator
public static final char separator
- See Also:
- Constant Field Values
-
type
public final Component.Type type
-
name
public final java.lang.String name
-
hashCode
public final int hashCode
-
-
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, SSTableFormat<?,?> format)
Parse the component part of a sstable filename into aComponent
object.- 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.
-
getSingletonsFor
public static java.lang.Iterable<Component> getSingletonsFor(SSTableFormat<?,?> format)
-
getSingletonsFor
public static java.lang.Iterable<Component> getSingletonsFor(java.lang.Class<? extends SSTableFormat<?,?>> formatClass)
-
isValidFor
public boolean isValidFor(Descriptor descriptor)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-