org.apache.sling.bgservlets.impl

## Class ExecutionEngineImpl

- java.lang.Object
- - org.apache.sling.bgservlets.impl.ExecutionEngineImpl

All Implemented Interfaces:
  ExecutionEngine

    @Service
    public class ExecutionEngineImpl
    extends Object
    implements ExecutionEngine

Simple ExecutionEngine TODO should use Sling's thread pool, and check synergies with scheduler services

### Nested Class Summary

Nested Classes
`static class` `ExecutionEngineImpl.QueueFullException`

### Field Summary

Fields
`static String` `PROP_CORE_POOL_SIZE`
`static String` `PROP_KEEP_ALIVE_TIME`
`static String` `PROP_MAX_POOL_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`ExecutionEngineImpl()`

### Method Summary

Methods
`protected void` `activate(Map<String,Object> props)`
`protected void` `deactivate()`
`JobStatus` `getJobStatus(String path)` Get JobStatus by path
`Iterator<JobStatus>` `getMatchingJobStatus(Predicate<JobStatus> p)` Enumerate JobStatus that match supplied predicate
`void` `queueForExecution(Runnable inputJob)` Add a job to the execution queue

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

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

### Field Detail

#### PROP_CORE_POOL_SIZE

    @Property(intValue=10)
    public static final String PROP_CORE_POOL_SIZE

See Also:
  Constant Field Values

#### PROP_MAX_POOL_SIZE

    @Property(intValue=20)
    public static final String PROP_MAX_POOL_SIZE

See Also:
  Constant Field Values

#### PROP_KEEP_ALIVE_TIME

    @Property(intValue=30)
    public static final String PROP_KEEP_ALIVE_TIME

See Also:
  Constant Field Values

### Constructor Detail

#### ExecutionEngineImpl

    public ExecutionEngineImpl()

### Method Detail

#### activate

    @Activate
    protected void activate(Map<String,Object> props)

#### deactivate

    @Deactivate
    protected void deactivate()

#### queueForExecution

    public void queueForExecution(Runnable inputJob)

Description copied from interface: `ExecutionEngine`
Add a job to the execution queue

Specified by:
  `queueForExecution` in interface `ExecutionEngine`

#### getJobStatus

    public JobStatus getJobStatus(String path)

Description copied from interface: `ExecutionEngine`
Get JobStatus by path

Specified by:
  `getJobStatus` in interface `ExecutionEngine`

#### getMatchingJobStatus

    public Iterator<JobStatus> getMatchingJobStatus(Predicate<JobStatus> p)

Description copied from interface: `ExecutionEngine`
Enumerate JobStatus that match supplied predicate

Specified by:
  `getMatchingJobStatus` in interface `ExecutionEngine`
Parameters:
  `p` - if null, returns all known JobStatus.