public class Descriptor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Descriptor.Type |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
cfname |
java.io.File |
directory |
SSTableFormat.Type |
formatType |
int |
generation |
java.lang.String |
ksname |
Descriptor.Type |
type |
Version |
version
version has the following format:
[a-z]+ |
Constructor and Description |
---|
Descriptor(java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
Descriptor.Type temp)
A descriptor that assumes CURRENT_VERSION.
|
Descriptor(java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
Descriptor.Type temp,
SSTableFormat.Type formatType) |
Descriptor(java.lang.String version,
java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
Descriptor.Type temp,
SSTableFormat.Type formatType) |
Descriptor(Version version,
java.io.File directory,
java.lang.String ksname,
java.lang.String cfname,
int generation,
Descriptor.Type temp,
SSTableFormat.Type formatType) |
Modifier and Type | Method and Description |
---|---|
Descriptor |
asType(Descriptor.Type type) |
java.lang.String |
baseFilename() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
filenameFor(Component component) |
java.lang.String |
filenameFor(java.lang.String suffix) |
static Pair<Descriptor,java.lang.String> |
fromFilename(java.io.File directory,
java.lang.String name) |
static Pair<Descriptor,java.lang.String> |
fromFilename(java.io.File directory,
java.lang.String name,
boolean skipComponent)
Filename of the form is vary by version:
<ksname>-<cfname>-(tmp-)?<version>-<gen>-<component> for cassandra 2.0 and before
(<tmp marker>-)?<version>-<gen>-<component> for cassandra 3.0 and later
If this is for SSTable of secondary index, directory should ends with index name for 2.1+.
|
static Descriptor |
fromFilename(java.lang.String filename) |
static Descriptor |
fromFilename(java.lang.String filename,
boolean skipComponent) |
static Descriptor |
fromFilename(java.lang.String filename,
SSTableFormat.Type formatType) |
SSTableFormat |
getFormat() |
IMetadataSerializer |
getMetadataSerializer() |
int |
hashCode() |
boolean |
isCompatible() |
java.lang.String |
relativeFilenameFor(Component component) |
java.lang.String |
toString() |
Descriptor |
withFormatType(SSTableFormat.Type newType) |
Descriptor |
withGeneration(int newGeneration) |
public final java.io.File directory
public final Version version
[a-z]+
public final java.lang.String ksname
public final java.lang.String cfname
public final int generation
public final Descriptor.Type type
public final SSTableFormat.Type formatType
public Descriptor(java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, Descriptor.Type temp)
public Descriptor(java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, Descriptor.Type temp, SSTableFormat.Type formatType)
public Descriptor(java.lang.String version, java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, Descriptor.Type temp, SSTableFormat.Type formatType)
public Descriptor(Version version, java.io.File directory, java.lang.String ksname, java.lang.String cfname, int generation, Descriptor.Type temp, SSTableFormat.Type formatType)
public Descriptor withGeneration(int newGeneration)
public Descriptor withFormatType(SSTableFormat.Type newType)
public java.lang.String filenameFor(Component component)
public java.lang.String baseFilename()
public java.lang.String relativeFilenameFor(Component component)
public SSTableFormat getFormat()
public java.lang.String filenameFor(java.lang.String suffix)
suffix
- A component suffix, such as 'Data.db'/'Index.db'/etcpublic static Descriptor fromFilename(java.lang.String filename)
filename
- The SSTable filenamefromFilename(File directory, String name)
public static Descriptor fromFilename(java.lang.String filename, SSTableFormat.Type formatType)
public static Descriptor fromFilename(java.lang.String filename, boolean skipComponent)
public static Pair<Descriptor,java.lang.String> fromFilename(java.io.File directory, java.lang.String name)
public static Pair<Descriptor,java.lang.String> fromFilename(java.io.File directory, java.lang.String name, boolean skipComponent)
directory
- The directory of the SSTable filesname
- The name of the SSTable fileskipComponent
- true if the name param should not be parsed for a component tagpublic Descriptor asType(Descriptor.Type type)
type
- temporary flagpublic IMetadataSerializer getMetadataSerializer()
public boolean isCompatible()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2015 The Apache Software Foundation