org.apache.cassandra.db.commitlog

## Class CommitLogDescriptor

- java.lang.Object
- - org.apache.cassandra.db.commitlog.CommitLogDescriptor

    public class CommitLogDescriptor
    extends java.lang.Object

### Field Summary

Fields
`static int` `current_version` Increment this number if there is a changes in the commit log disc layout or MessagingVersion changes.
`long` `id`
`static int` `VERSION_12`
`static int` `VERSION_20`

### Constructor Summary

Constructors
Constructor and Description
`CommitLogDescriptor(int version, long id)`
`CommitLogDescriptor(long id)`

### Method Summary

Methods
`java.lang.String` `fileName()`
`static CommitLogDescriptor` `fromFileName(java.lang.String name)`
`int` `getMessagingVersion()`
`int` `getVersion()`
`static boolean` `isValid(java.lang.String filename)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### VERSION_12

    public static final int VERSION_12

See Also:
  Constant Field Values

#### VERSION_20

    public static final int VERSION_20

See Also:
  Constant Field Values

#### current_version

    public static final int current_version

Increment this number if there is a changes in the commit log disc layout or MessagingVersion changes. Note: make sure to handle `getMessagingVersion()`

See Also:
  Constant Field Values

#### id

    public final long id

### Constructor Detail

#### CommitLogDescriptor

    public CommitLogDescriptor(int version,
                       long id)

#### CommitLogDescriptor

    public CommitLogDescriptor(long id)

### Method Detail

#### fromFileName

    public static CommitLogDescriptor fromFileName(java.lang.String name)

#### getMessagingVersion

    public int getMessagingVersion()

#### getVersion

    public int getVersion()

#### fileName

    public java.lang.String fileName()

#### isValid

    public static boolean isValid(java.lang.String filename)

Parameters:
  `filename` - the filename to check
Returns:
  true if filename could be a commit log based on it's filename