CommitLogArchiver (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db.commitlog

## Class CommitLogArchiver

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

-     public class CommitLogArchiver
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.Map<java.lang.String,java.util.concurrent.Future<?>>` | `archivePending`
    `static java.text.SimpleDateFormat` | `format`
    `java.util.concurrent.TimeUnit` | `precision`
    `long` | `restorePointInTime`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CommitLogArchiver(java.lang.String archiveCommand, java.lang.String restoreCommand, java.lang.String restoreDirectories, long restorePointInTime, java.util.concurrent.TimeUnit precision)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CommitLogArchiver` | `construct()`
    `static CommitLogArchiver` | `disabled()`
    `void` | `maybeArchive(CommitLogSegment segment)`
    `void` | `maybeArchive(java.lang.String path, java.lang.String name)` Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync).
    `void` | `maybeRestoreArchive()`
    `boolean` | `maybeWaitForArchiving(java.lang.String name)`

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

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

- - ### Field Detail

    - #### format

          public static final java.text.SimpleDateFormat format

    - #### archivePending

          public final java.util.Map<java.lang.String,java.util.concurrent.Future<?>> archivePending

    - #### restorePointInTime

          public long restorePointInTime

    - #### precision

          public final java.util.concurrent.TimeUnit precision

  - ### Constructor Detail

    - #### CommitLogArchiver

          public CommitLogArchiver(java.lang.String archiveCommand,
                                   java.lang.String restoreCommand,
                                   java.lang.String restoreDirectories,
                                   long restorePointInTime,
                                   java.util.concurrent.TimeUnit precision)

  - ### Method Detail

    - #### disabled

          public static CommitLogArchiver disabled()

    - #### construct

          public static CommitLogArchiver construct()

    - #### maybeArchive

          public void maybeArchive(CommitLogSegment segment)

    - #### maybeArchive

          public void maybeArchive(java.lang.String path,
                                   java.lang.String name)

      Differs from the above because it can be used on any file, rather than only managed commit log segments (and thus cannot call waitForFinalSync). Used to archive files present in the commit log directory at startup (CASSANDRA-6904)

    - #### maybeWaitForArchiving

          public boolean maybeWaitForArchiving(java.lang.String name)

    - #### maybeRestoreArchive

          public void maybeRestoreArchive()

Copyright © 2018 The Apache Software Foundation