Class MultiMemberTaskLocationResolver

  • All Implemented Interfaces:
    org.wso2.carbon.ntask.core.TaskLocationResolver

    public class MultiMemberTaskLocationResolver
    extends Object
    implements org.wso2.carbon.ntask.core.TaskLocationResolver
    Use this TaskLocationResolver only if you need to run the same task on multiple worker nodes concurrently. For each worker/member where you need to run the task concurrently, you may have to call this TaskLocationResolver and get the member location index value. Then you can schedule that particular task on the selected member node.
    • Constructor Detail

      • MultiMemberTaskLocationResolver

        public MultiMemberTaskLocationResolver()
    • Method Detail

      • init

        public void init​(Map<String,​String> properties)
                  throws org.wso2.carbon.ntask.common.TaskException
        Specified by:
        init in interface org.wso2.carbon.ntask.core.TaskLocationResolver
        Throws:
        org.wso2.carbon.ntask.common.TaskException
      • getLocation

        public int getLocation​(org.wso2.carbon.ntask.core.TaskServiceContext ctx,
                               org.wso2.carbon.ntask.core.TaskInfo taskInfo)
                        throws org.wso2.carbon.ntask.common.TaskException
        Specified by:
        getLocation in interface org.wso2.carbon.ntask.core.TaskLocationResolver
        Throws:
        org.wso2.carbon.ntask.common.TaskException