org.apache.solr.handler

## Class SnapShooter

- java.lang.Object
- - org.apache.solr.handler.SnapShooter

-     public class SnapShooter
      extends Object

  Provides functionality equivalent to the snapshooter script

  This is no longer used in standard replication.
  Since:
    solr 1.4

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DATE_FMT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnapShooter(BackupRepository backupRepo, SolrCore core, URI location, String snapshotName, String commitName)`
    `SnapShooter(SolrCore core, String location, String snapshotName)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createSnapAsync(IndexCommit indexCommit, int numberToKeep, Consumer<NamedList> result)`
    `NamedList` | `createSnapshot()`
    `protected NamedList` | `createSnapshot(IndexCommit indexCommit)`
    `protected void` | `deleteNamedSnapshot(ReplicationHandler replicationHandler)`
    `protected void` | `deleteSnapAsync(ReplicationHandler replicationHandler)`
    `BackupRepository` | `getBackupRepository()`
    `URI` | `getLocation()` Gets the parent directory of the snapshots.
    `void` | `validateCreateSnapshot()`
    `void` | `validateDeleteSnapshot()`

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

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

- - ### Field Detail

    - #### DATE_FMT

          public static final String DATE_FMT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SnapShooter

          @Deprecated
          public SnapShooter(SolrCore core,
                                         String location,
                                         String snapshotName)

      Deprecated.

    - #### SnapShooter

          public SnapShooter(BackupRepository backupRepo,
                             SolrCore core,
                             URI location,
                             String snapshotName,
                             String commitName)

  - ### Method Detail

    - #### getBackupRepository

          public BackupRepository getBackupRepository()

    - #### getLocation

          public URI getLocation()

      Gets the parent directory of the snapshots. This is the `location` given in the constructor.

    - #### validateDeleteSnapshot

          public void validateDeleteSnapshot()

    - #### deleteSnapAsync

          protected void deleteSnapAsync(ReplicationHandler replicationHandler)

    - #### validateCreateSnapshot

          public void validateCreateSnapshot()
                                      throws IOException

      Throws:
        `IOException`

    - #### createSnapshot

          public NamedList createSnapshot()
                                   throws Exception

      Throws:
        `Exception`

    - #### createSnapAsync

          public void createSnapAsync(IndexCommit indexCommit,
                                      int numberToKeep,
                                      Consumer<NamedList> result)

    - #### createSnapshot

          protected NamedList createSnapshot(IndexCommit indexCommit)
                                      throws Exception

      Throws:
        `Exception`

    - #### deleteNamedSnapshot

          protected void deleteNamedSnapshot(ReplicationHandler replicationHandler)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.