org.apache.sling.event.impl.jobs.config
Class InternalQueueConfiguration

java.lang.Object
  extended by org.apache.sling.event.impl.jobs.config.InternalQueueConfiguration
All Implemented Interfaces:
Comparable<InternalQueueConfiguration>, QueueConfiguration

@Service(value=InternalQueueConfiguration.class)
@Properties(value={@Property(name="queue.name"),@Property(name="queue.type",value="UNORDERED",options={@PropertyOption(name="UNORDERED",value="Parallel"),@PropertyOption(name="ORDERED",value="Ordered"),@PropertyOption(name="TOPIC_ROUND_ROBIN",value="Topic Round Robin"),@PropertyOption(name="IGNORE",value="Ignore"),@PropertyOption(name="DROP",value="Drop")}),@Property(name="queue.topics",unbounded=ARRAY),@Property(name="queue.maxparallel",intValue=15),@Property(name="queue.retries",intValue=10),@Property(name="queue.retrydelay",longValue=2000L),@Property(name="queue.priority",value="NORM",options={@PropertyOption(name="NORM",value="Norm"),@PropertyOption(name="MIN",value="Min"),@PropertyOption(name="MAX",value="Max")}),@Property(name="service.ranking",intValue=0,propertyPrivate=false,label="%queue.ranking.name",description="%queue.ranking.description")})
public class InternalQueueConfiguration
extends Object
implements QueueConfiguration, Comparable<InternalQueueConfiguration>


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.sling.event.jobs.QueueConfiguration
QueueConfiguration.Type
 
Constructor Summary
InternalQueueConfiguration()
           
 
Method Summary
protected  void activate(Map<String,Object> params)
          Create a new queue configuration
 int compareTo(InternalQueueConfiguration other)
           
static InternalQueueConfiguration fromConfiguration(Map<String,Object> params)
          Create a new configuration from a config
 String[] getApplicationIds()
          Deprecated. 
 int getMaxParallel()
          Return the max number of parallel processes.
 int getMaxRetries()
          Return the max number of retries, -1 for endless retry!
 String getName()
          Return the name of the queue.
 String getPid()
           
 JobUtil.JobPriority getPriority()
          Return the thread priority for the job thread.
 int getRanking()
          Get the ranking of this configuration.
 long getRetryDelayInMs()
          Return the retry delay in ms
 String[] getTopics()
          The list of topics this queue is bound to.
 QueueConfiguration.Type getType()
          Return the queue type.
 boolean isLocalQueue()
          Deprecated. 
 boolean isValid()
           
 String match(String topic)
          Check if the queue processes the event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalQueueConfiguration

public InternalQueueConfiguration()
Method Detail

fromConfiguration

public static InternalQueueConfiguration fromConfiguration(Map<String,Object> params)
Create a new configuration from a config


activate

@Activate
protected void activate(Map<String,Object> params)
Create a new queue configuration


isValid

public boolean isValid()

match

public String match(String topic)
Check if the queue processes the event.

Parameters:
topic - The topic of the event
Returns:
The queue name or null

getName

public String getName()
Return the name of the queue.


getRetryDelayInMs

public long getRetryDelayInMs()
Description copied from interface: QueueConfiguration
Return the retry delay in ms

Specified by:
getRetryDelayInMs in interface QueueConfiguration
See Also:
QueueConfiguration.getRetryDelayInMs()

getMaxRetries

public int getMaxRetries()
Description copied from interface: QueueConfiguration
Return the max number of retries, -1 for endless retry!

Specified by:
getMaxRetries in interface QueueConfiguration
See Also:
QueueConfiguration.getMaxRetries()

getType

public QueueConfiguration.Type getType()
Description copied from interface: QueueConfiguration
Return the queue type.

Specified by:
getType in interface QueueConfiguration
See Also:
QueueConfiguration.getType()

getPriority

public JobUtil.JobPriority getPriority()
Description copied from interface: QueueConfiguration
Return the thread priority for the job thread.

Specified by:
getPriority in interface QueueConfiguration
See Also:
QueueConfiguration.getPriority()

getMaxParallel

public int getMaxParallel()
Description copied from interface: QueueConfiguration
Return the max number of parallel processes.

Specified by:
getMaxParallel in interface QueueConfiguration
See Also:
QueueConfiguration.getMaxParallel()

isLocalQueue

@Deprecated
public boolean isLocalQueue()
Deprecated. 

Specified by:
isLocalQueue in interface QueueConfiguration

getTopics

public String[] getTopics()
Description copied from interface: QueueConfiguration
The list of topics this queue is bound to.

Specified by:
getTopics in interface QueueConfiguration
See Also:
QueueConfiguration.getTopics()

getRanking

public int getRanking()
Description copied from interface: QueueConfiguration
Get the ranking of this configuration.

Specified by:
getRanking in interface QueueConfiguration
See Also:
QueueConfiguration.getRanking()

getPid

public String getPid()

getApplicationIds

@Deprecated
public String[] getApplicationIds()
Deprecated. 

Specified by:
getApplicationIds in interface QueueConfiguration

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(InternalQueueConfiguration other)
Specified by:
compareTo in interface Comparable<InternalQueueConfiguration>


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