Class TopologyCapabilities
java.lang.Object
org.apache.sling.event.impl.jobs.config.TopologyCapabilities
The capabilities of a topology.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTopologyCapabilities
(TopologyView view, JobManagerConfiguration config) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deactivate this object.detectTarget
(String jobTopic, Map<String, Object> jobProperties, QueueConfigurationManager.QueueInfo queueInfo) Detect the target instance.Get the instance capabilities.getPotentialTargets
(String jobTopic) Return the potential targets (Sling IDs) sorted by IDboolean
isActive()
Is this object still active?boolean
Is this instance still active?boolean
isLeader()
Is the current instance the leader?boolean
Is this capabilities the same as represented by the provided instance map?
-
Field Details
-
PROPERTY_TOPICS
- See Also:
-
-
Constructor Details
-
TopologyCapabilities
Create a new instance- Parameters:
view
- The new viewconfig
- The current job manager configuration.
-
-
Method Details
-
getAllInstancesMap
-
isSame
Is this capabilities the same as represented by the provided instance map?- Parameters:
newAllInstancesMap
- The instance map- Returns:
true
if they represent the same state.
-
deactivate
public void deactivate()Deactivate this object. -
isActive
public boolean isActive()Is this object still active? If it is not active anymore it should not be used!- Returns:
true
if still active.
-
isActive
Is this instance still active?- Parameters:
instanceId
- The instance id- Returns:
true
if the instance is active.
-
isLeader
public boolean isLeader()Is the current instance the leader? -
getPotentialTargets
Return the potential targets (Sling IDs) sorted by ID- Returns:
- A list of instance descriptions. The list might be empty.
-
detectTarget
public String detectTarget(String jobTopic, Map<String, Object> jobProperties, QueueConfigurationManager.QueueInfo queueInfo) Detect the target instance. -
getInstanceCapabilities
Get the instance capabilities.- Returns:
- The map of instance capabilities.
-