Package org.wso2.carbon.ntask.core.impl
Class RoundRobinTaskLocationResolver
- java.lang.Object
-
- org.wso2.carbon.ntask.core.impl.RoundRobinTaskLocationResolver
-
- All Implemented Interfaces:
TaskLocationResolver
public class RoundRobinTaskLocationResolver extends Object implements TaskLocationResolver
This class represents a TaskLocationResolver implementation, which assigns a location to the task in a round robin fashion.
-
-
Constructor Summary
Constructors Constructor Description RoundRobinTaskLocationResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLocation(TaskServiceContext ctx, TaskInfo taskInfo)
Returns the location the given task should be scheduled in.void
init(Map<String,String> properties)
Initializes the task location resolver with the given properties.
-
-
-
Method Detail
-
init
public void init(Map<String,String> properties) throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskLocationResolver
Initializes the task location resolver with the given properties.- Specified by:
init
in interfaceTaskLocationResolver
- Parameters:
properties
- The property map- Throws:
org.wso2.carbon.ntask.common.TaskException
-
getLocation
public int getLocation(TaskServiceContext ctx, TaskInfo taskInfo) throws org.wso2.carbon.ntask.common.TaskException
Description copied from interface:TaskLocationResolver
Returns the location the given task should be scheduled in.- Specified by:
getLocation
in interfaceTaskLocationResolver
- Parameters:
ctx
- The task context, which contains environmental information on other tasks etc..taskInfo
- The task information of the task to be scheduled- Returns:
- The location of the task to be scheduled
- Throws:
org.wso2.carbon.ntask.common.TaskException
-
-