Package org.apache.sling.distribution.journal.impl.precondition

## Class StagingPrecondition

- java.lang.Object
- - org.apache.sling.distribution.journal.impl.precondition.StagingPrecondition

All Implemented Interfaces:
  `Runnable`, `Precondition`

    public class StagingPrecondition
    extends Object
    implements Precondition, Runnable

This is a precondition that watches status messages from other instances in order to confirm that a package can be processed. The check will block until a status is found. If no status is received in 60 seconds it will throw an exception.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.sling.distribution.journal.impl.precondition.Precondition

`Precondition.Decision`

### Constructor Summary

Constructors
`StagingPrecondition()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `activate()`
`Precondition.Decision` `canProcess​(String subAgentName, long pkgOffset)` Checks if a package can be processed
`void` `deactivate()`
`void` `run()`

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

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

### Constructor Detail

#### StagingPrecondition

    public StagingPrecondition()

### Method Detail

#### activate

    public void activate()

#### deactivate

    public void deactivate()

#### canProcess

    public Precondition.Decision canProcess​(String subAgentName,
                                            long pkgOffset)

Description copied from interface: `Precondition`
Checks if a package can be processed

Specified by:
  `canProcess` in interface `Precondition`

#### run

    public void run()

Specified by:
  `run` in interface `Runnable`