Class InternalQueueConfiguration
- java.lang.Object
-
- org.apache.sling.event.impl.jobs.config.InternalQueueConfiguration
-
- All Implemented Interfaces:
Comparable<InternalQueueConfiguration>
,org.apache.sling.event.jobs.QueueConfiguration
public class InternalQueueConfiguration extends Object implements org.apache.sling.event.jobs.QueueConfiguration, Comparable<InternalQueueConfiguration>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
InternalQueueConfiguration.Config
-
Constructor Summary
Constructors Constructor Description InternalQueueConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(Map<String,Object> props, InternalQueueConfiguration.Config config)
Create a new queue configurationint
compareTo(InternalQueueConfiguration other)
static InternalQueueConfiguration
fromConfiguration(Map<String,Object> props, InternalQueueConfiguration.Config config)
Create a new configuration from a configint
getMaxParallel()
int
getMaxRetries()
String
getName()
Return the name of the queue.int
getOwnThreadPoolSize()
String
getPid()
int
getRanking()
long
getRetryDelayInMs()
org.apache.sling.event.jobs.QueueConfiguration.ThreadPriority
getThreadPriority()
String[]
getTopics()
org.apache.sling.event.jobs.QueueConfiguration.Type
getType()
boolean
isKeepJobs()
boolean
isPreferRunOnCreationInstance()
boolean
isValid()
String
match(String topic)
Check if the queue processes the event.String
toString()
-
-
-
Method Detail
-
fromConfiguration
public static InternalQueueConfiguration fromConfiguration(Map<String,Object> props, InternalQueueConfiguration.Config config)
Create a new configuration from a config
-
activate
protected void activate(Map<String,Object> props, InternalQueueConfiguration.Config config)
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()
- Specified by:
getRetryDelayInMs
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getRetryDelayInMs()
-
getMaxRetries
public int getMaxRetries()
- Specified by:
getMaxRetries
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getMaxRetries()
-
getType
public org.apache.sling.event.jobs.QueueConfiguration.Type getType()
- Specified by:
getType
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getType()
-
getMaxParallel
public int getMaxParallel()
- Specified by:
getMaxParallel
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getMaxParallel()
-
getTopics
public String[] getTopics()
- Specified by:
getTopics
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getTopics()
-
getRanking
public int getRanking()
- Specified by:
getRanking
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
- See Also:
QueueConfiguration.getRanking()
-
getPid
public String getPid()
-
isKeepJobs
public boolean isKeepJobs()
- Specified by:
isKeepJobs
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
-
getOwnThreadPoolSize
public int getOwnThreadPoolSize()
- Specified by:
getOwnThreadPoolSize
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
-
isPreferRunOnCreationInstance
public boolean isPreferRunOnCreationInstance()
- Specified by:
isPreferRunOnCreationInstance
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
-
compareTo
public int compareTo(InternalQueueConfiguration other)
- Specified by:
compareTo
in interfaceComparable<InternalQueueConfiguration>
-
getThreadPriority
public org.apache.sling.event.jobs.QueueConfiguration.ThreadPriority getThreadPriority()
- Specified by:
getThreadPriority
in interfaceorg.apache.sling.event.jobs.QueueConfiguration
-
-