org.modeshape.jcr

## Class JcrRepository.BackgroundRepositoryTask

- java.lang.Object
- - org.modeshape.jcr.JcrRepository.BackgroundRepositoryTask

- All Implemented Interfaces:
    Runnable
  Direct Known Subclasses:
    JcrRepository.BinaryValueGarbageCollectionTask, JcrRepository.JournalingGCTask, JcrRepository.LockGarbageCollectionTask, JcrRepository.OptimizationTask
  Enclosing class:
    JcrRepository

      protected abstract static class JcrRepository.BackgroundRepositoryTask
      extends Object
      implements Runnable

  The garbage collection tasks should get cancelled before the repository is shut down, but just in case we'll use a weak reference to hold onto the JcrRepository instance and we'll also check that the repository is running before we actually do any work.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JcrRepository.BackgroundRepositoryTask(JcrRepository repository)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `doRun(JcrRepository repository)` Perform the garbage collection task.
    `void` | `run()`

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

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

- - ### Constructor Detail

    - #### JcrRepository.BackgroundRepositoryTask

          protected JcrRepository.BackgroundRepositoryTask(JcrRepository repository)

  - ### Method Detail

    - #### run

          public final void run()

      Specified by:
        `run` in interface `Runnable`

    - #### doRun

          protected abstract void doRun(JcrRepository repository)

      Perform the garbage collection task.
      Parameters:
        `repository` - the non-null and `running` repository instance

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