org.modeshape.jcr

## Class BackupService.BackupActivity

- java.lang.Object
- - org.modeshape.jcr.BackupService.Activity
  - - org.modeshape.jcr.BackupService.BackupActivity

- Enclosing class:
    BackupService

      @NotThreadSafe
      public static class BackupService.BackupActivity
      extends BackupService.Activity

  The `BackupService.Activity` subclass that performs content backup operations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected BlockingQueue<NodeKey>` | `changedDocumentQueue`
    `protected ExecutorService` | `changedDocumentWorker`

    - ### Fields inherited from class org.modeshape.jcr.BackupService.Activity

      `backupDirectory, binaryDirectory, binaryStore, changeDirectory, documentStore, problems, repositoryCache`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `BackupService.BackupActivity(File backupDirectory, LocalDocumentStore documentStore, BinaryStore binaryStore, RepositoryCache repositoryCache, long documentsPerFile, boolean compress)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Problems` | `execute()` Execute the activity, using the repository state as it currently exists.
    `protected boolean` | `initializeAreaOnDisk()` Initialize the backup area on disk, ensuring that the backup location does exist.
    `protected void` | `writeToChangedArea(Iterable<BinaryKey> unusedBinaries)`
    `protected void` | `writeToChangedArea(SchematicEntry document)`
    `protected void` | `writeToContentArea(BinaryKey key, InputStream binaryContent)`
    `protected void` | `writeToContentArea(SchematicEntry document)`

    - ### Methods inherited from class org.modeshape.jcr.BackupService.Activity

      `backupLocation, repositoryName`

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

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

- - ### Field Detail

    - #### changedDocumentWorker

          protected final ExecutorService changedDocumentWorker

    - #### changedDocumentQueue

          protected final BlockingQueue<NodeKey> changedDocumentQueue

  - ### Constructor Detail

    - #### BackupService.BackupActivity

          protected BackupService.BackupActivity(File backupDirectory,
                                      LocalDocumentStore documentStore,
                                      BinaryStore binaryStore,
                                      RepositoryCache repositoryCache,
                                      long documentsPerFile,
                                      boolean compress)

  - ### Method Detail

    - #### initializeAreaOnDisk

          protected boolean initializeAreaOnDisk()

      Initialize the backup area on disk, ensuring that the backup location does exist.
      Returns:
        true if initialization was successful, or false if there was a problem

    - #### writeToContentArea

          protected void writeToContentArea(SchematicEntry document)

    - #### writeToContentArea

          protected void writeToContentArea(BinaryKey key,
                                InputStream binaryContent)

    - #### writeToChangedArea

          protected void writeToChangedArea(SchematicEntry document)

    - #### writeToChangedArea

          protected void writeToChangedArea(Iterable<BinaryKey> unusedBinaries)

    - #### execute

          public Problems execute()

      Description copied from class: `BackupService.Activity`
      Execute the activity, using the repository state as it currently exists.
      Specified by:
        `execute` in class `BackupService.Activity`
      Returns:
        the problems describing any issues or exceptions that occur during the activity's execution; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.