org.apache.sling.event.impl.jobs
Class JobManagerConfiguration

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.JobManagerConfiguration

public class JobManagerConfiguration
extends Object

Configuration of the job handling


Field Summary
static String CONFIG_PROPERTY_BACKGROUND_LOAD_DELAY
          The background loader waits this time of seconds after startup before loading events from the repository.
static String CONFIG_PROPERTY_REPOSITORY_PATH
          The path where all jobs are stored.
static long DEFAULT_BACKGROUND_LOAD_DELAY
          Default background load delay.
static boolean DEFAULT_DISABLE_DISTRIBUTION
          Default for disabling the distribution.
static String DEFAULT_REPOSITORY_PATH
          Default repository path.
static String PROPERTY_DISABLE_DISTRIBUTION
          Configuration switch for distributing the jobs.
 
Constructor Summary
JobManagerConfiguration(Map<String,Object> props)
           
 
Method Summary
 boolean disableDistribution()
           
 String getAssginedJobsPath()
          Get the resource path for all assigned jobs.
 long getBackgroundLoadDelay()
           
 String getLocalJobsPath()
          Get the resource path for all jobs assigned to the current instance
 String getLocksPath()
          Get the resource path for all locks
 String getPreviousVersionAnonPath()
           
 String getPreviousVersionIdentifiedPath()
           
 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.
 boolean isJob(String jobPath)
           
 boolean isLocalJob(String jobPath)
           
 boolean isLock(String lockPath)
           
 void update(Map<String,Object> props)
          Update with a new configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_REPOSITORY_PATH

public static final String DEFAULT_REPOSITORY_PATH
Default repository path.

See Also:
Constant Field Values

CONFIG_PROPERTY_REPOSITORY_PATH

public static final String CONFIG_PROPERTY_REPOSITORY_PATH
The path where all jobs are stored.

See Also:
Constant Field Values

DEFAULT_BACKGROUND_LOAD_DELAY

public static final long DEFAULT_BACKGROUND_LOAD_DELAY
Default background load delay.

See Also:
Constant Field Values

CONFIG_PROPERTY_BACKGROUND_LOAD_DELAY

public static final String CONFIG_PROPERTY_BACKGROUND_LOAD_DELAY
The background loader waits this time of seconds after startup before loading events from the repository. (in secs)

See Also:
Constant Field Values

DEFAULT_DISABLE_DISTRIBUTION

public static final boolean DEFAULT_DISABLE_DISTRIBUTION
Default for disabling the distribution.

See Also:
Constant Field Values

PROPERTY_DISABLE_DISTRIBUTION

public static final String PROPERTY_DISABLE_DISTRIBUTION
Configuration switch for distributing the jobs.

See Also:
Constant Field Values
Constructor Detail

JobManagerConfiguration

public JobManagerConfiguration(Map<String,Object> props)
Method Detail

update

public void update(Map<String,Object> props)
Update with a new configuration


getAssginedJobsPath

public String getAssginedJobsPath()
Get the resource path for all assigned jobs.

Returns:
The path - does not end with a slash.

getUnassignedJobsPath

public String getUnassignedJobsPath()
Get the resource path for all unassigned jobs.

Returns:
The path - does not end with a slash.

getLocalJobsPath

public String getLocalJobsPath()
Get the resource path for all jobs assigned to the current instance

Returns:
The path - does not end with a slash

getLocksPath

public String getLocksPath()
Get the resource path for all locks

Returns:
The path - does not end with a slash

getBackgroundLoadDelay

public long getBackgroundLoadDelay()

getUniquePath

public String getUniquePath(String targetId,
                            String topic,
                            String jobId,
                            Map<String,Object> jobProperties)
Create a unique job path (folder and name) for the job.


getUniqueId

public String getUniqueId(String jobTopic)
Get the unique job id


isLocalJob

public boolean isLocalJob(String jobPath)

isJob

public boolean isJob(String jobPath)

isLock

public boolean isLock(String lockPath)

getPreviousVersionAnonPath

public String getPreviousVersionAnonPath()

getPreviousVersionIdentifiedPath

public String getPreviousVersionIdentifiedPath()

disableDistribution

public boolean disableDistribution()


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.