CommitLogDescriptor (apache-cassandra API)
Date: 2014-10-21

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
    Modifier and Type | Field and Description
    --- | ---
    `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`
    `static int` | `VERSION_21`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(CommitLogDescriptor that)`
    `boolean` | `equals(java.lang.Object that)`
    `java.lang.String` | `fileName()`
    `static CommitLogDescriptor` | `fromFileName(java.lang.String name)`
    `static CommitLogDescriptor` | `fromHeader(java.io.File file)`
    `int` | `getMessagingVersion()`
    `static boolean` | `isValid(java.lang.String filename)`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, hashCode, notify, notifyAll, 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

    - #### VERSION_21

          public static final int VERSION_21

      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

    - #### fromHeader

          public static CommitLogDescriptor fromHeader(java.io.File file)

    - #### fromFileName

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

    - #### getMessagingVersion

          public int getMessagingVersion()

    - #### 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

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object that)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### equals

          public boolean equals(CommitLogDescriptor that)

Copyright © 2014 The Apache Software Foundation