public class JobManagerConfiguration extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JobManagerConfiguration.Config |
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_BACKGROUND_LOAD_DELAY
Default background load delay.
|
static String |
DEFAULT_REPOSITORY_PATH
Default resource path for jobs.
|
static String |
DEFAULT_SCHEDULED_JOBS_PATH
Default resource path for scheduled jobs.
|
static String |
PROPERTY_BACKGROUND_LOAD_DELAY
The background loader waits this time of seconds after startup before loading events from the repository.
|
static String |
PROPERTY_REPOSITORY_PATH
The path where all jobs are stored.
|
static String |
PROPERTY_SCHEDULED_JOBS_PATH
Configuration property for the scheduled jobs path.
|
| Constructor and Description |
|---|
JobManagerConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(Map<String,Object> props,
JobManagerConfiguration.Config config)
Activate this component.
|
void |
addJobToRetryList(org.apache.sling.event.jobs.Job job) |
void |
addListener(ConfigurationChangeListener service)
Add a topology aware listener
|
List<org.apache.sling.event.jobs.Job> |
clearJobRetryList() |
org.apache.sling.api.resource.ResourceResolver |
createResourceResolver()
Create a new resource resolver for reading and writing the resource tree.
|
protected void |
deactivate()
Deactivate
|
boolean |
disableDistribution() |
String |
getAssginedJobsPath()
Get the resource path for all assigned jobs.
|
org.slf4j.Logger |
getAuditLogger()
The audit logger is logging actions for auditing.
|
int |
getHistoryCleanUpRemovedJobs() |
org.apache.sling.event.jobs.Job |
getJobFromRetryList(String jobId) |
String |
getJobsBasePathWithSlash() |
String |
getLocalJobsPath()
Get the resource path for all jobs assigned to the current instance
|
org.slf4j.Logger |
getMainLogger()
Get main logger.
|
String |
getPreviousVersionAnonPath() |
String |
getPreviousVersionIdentifiedPath() |
int |
getProgressLogMaxCount() |
QueueConfigurationManager |
getQueueConfigurationManager() |
String |
getScheduledJobsPath(boolean slash)
Get the scheduled jobs path
|
String |
getStoragePath(String topic,
String jobId,
boolean isSuccess)
Get the storage path for finished jobs.
|
String |
getStoredCancelledJobsPath() |
String |
getStoredSuccessfulJobsPath() |
TopologyCapabilities |
getTopologyCapabilities()
Get the current topology capabilities.
|
String |
getUnassignedJobsPath()
Get the resource path for all unassigned jobs.
|
String |
getUniqueId(String jobTopic)
Get the unique job id
|
String |
getUniquePath(String targetId,
String topic,
String jobId,
Map<String,Object> jobProperties)
Create a unique job path (folder and name) for the job.
|
void |
handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
This method is invoked asynchronously from the TopologyHandler.
|
boolean |
isActive()
Is this component still active?
|
boolean |
isJob(String jobPath) |
boolean |
isLocalJob(String jobPath) |
boolean |
isStoragePath(String path)
Check whether this is a storage path.
|
boolean |
removeJobFromRetryList(org.apache.sling.event.jobs.Job job) |
void |
removeListener(ConfigurationChangeListener service)
Remove a topology aware listener
|
protected void |
update(Map<String,Object> props,
JobManagerConfiguration.Config config)
Update with a new configuration
|
public static final String DEFAULT_REPOSITORY_PATH
public static final long DEFAULT_BACKGROUND_LOAD_DELAY
public static final String DEFAULT_SCHEDULED_JOBS_PATH
public static final String PROPERTY_REPOSITORY_PATH
public static final String PROPERTY_BACKGROUND_LOAD_DELAY
public static final String PROPERTY_SCHEDULED_JOBS_PATH
protected void activate(Map<String,Object> props, JobManagerConfiguration.Config config)
props - Configuration propertiesconfig - Configuration propertiesRuntimeException - If the default paths can't be createdprotected void update(Map<String,Object> props, JobManagerConfiguration.Config config)
protected void deactivate()
public int getHistoryCleanUpRemovedJobs()
public boolean isActive()
public org.apache.sling.api.resource.ResourceResolver createResourceResolver()
null if the component is already deactivated.RuntimeException - if the resolver can't be created.public TopologyCapabilities getTopologyCapabilities()
nullpublic QueueConfigurationManager getQueueConfigurationManager()
public org.slf4j.Logger getMainLogger()
public String getAssginedJobsPath()
public String getUnassignedJobsPath()
public String getLocalJobsPath()
public String getUniquePath(String targetId, String topic, String jobId, Map<String,Object> jobProperties)
public boolean isLocalJob(String jobPath)
public boolean isJob(String jobPath)
public String getJobsBasePathWithSlash()
public int getProgressLogMaxCount()
public String getPreviousVersionAnonPath()
public String getPreviousVersionIdentifiedPath()
public boolean disableDistribution()
public String getStoredCancelledJobsPath()
public String getStoredSuccessfulJobsPath()
public String getStoragePath(String topic, String jobId, boolean isSuccess)
topic - Topic of the finished jobjobId - The job id of the finished job.isSuccess - Whether processing was successful or notpublic boolean isStoragePath(String path)
public String getScheduledJobsPath(boolean slash)
slash - If false the path is returned, if true the path appended with a slash is returned.public void handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
TopologyEventListener.handleTopologyEvent(org.apache.sling.discovery.TopologyEvent)public void addListener(ConfigurationChangeListener service)
service - Listener to notify about changes.public void removeListener(ConfigurationChangeListener service)
service - Listener to notify about changes.public void addJobToRetryList(org.apache.sling.event.jobs.Job job)
public List<org.apache.sling.event.jobs.Job> clearJobRetryList()
public boolean removeJobFromRetryList(org.apache.sling.event.jobs.Job job)
public org.apache.sling.event.jobs.Job getJobFromRetryList(String jobId)
public org.slf4j.Logger getAuditLogger()
Copyright © 2007–2023 The Apache Software Foundation. All rights reserved.