public class MultiMemberTaskLocationResolver extends Object implements org.wso2.carbon.ntask.core.TaskLocationResolver
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 and Description |
---|
MultiMemberTaskLocationResolver() |
Modifier and Type | Method and Description |
---|---|
int |
getLocation(org.wso2.carbon.ntask.core.TaskServiceContext ctx,
org.wso2.carbon.ntask.core.TaskInfo taskInfo) |
void |
init(Map<String,String> properties) |
public void init(Map<String,String> properties) throws org.wso2.carbon.ntask.common.TaskException
init
in interface org.wso2.carbon.ntask.core.TaskLocationResolver
org.wso2.carbon.ntask.common.TaskException
public int getLocation(org.wso2.carbon.ntask.core.TaskServiceContext ctx, org.wso2.carbon.ntask.core.TaskInfo taskInfo) throws org.wso2.carbon.ntask.common.TaskException
getLocation
in interface org.wso2.carbon.ntask.core.TaskLocationResolver
org.wso2.carbon.ntask.common.TaskException
Copyright © 2022 WSO2. All rights reserved.