@Service(value="cuba_ScheduledTasksService") public class SchedulingServiceBean extends java.lang.Object implements SchedulingService
Modifier and Type | Class and Description |
---|---|
static class |
SchedulingServiceBean.SetSchedulingActiveMsg |
NAME
Constructor and Description |
---|
SchedulingServiceBean() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.util.List<MethodInfo>> |
getAvailableBeans()
Return information about beans and their methods that can be invoked by scheduled tasks.
|
java.util.List<java.lang.String> |
getAvailableUsers()
Return a list of user login names that can be used by scheduled tasks.
|
void |
setActive(boolean active)
Activate/deactivate scheduling for all servers in the cluster.
|
void |
setActive(ScheduledTask task,
boolean active)
Activate/deactivate specific task.
|
void |
setActive(java.util.Set<ScheduledTask> tasks,
boolean active)
Activate or deactivate set of scheduled tasks.
|
void |
setClusterManager(ClusterManagerAPI clusterManager) |
@Inject public void setClusterManager(ClusterManagerAPI clusterManager)
public java.util.Map<java.lang.String,java.util.List<MethodInfo>> getAvailableBeans()
SchedulingService
getAvailableBeans
in interface SchedulingService
public java.util.List<java.lang.String> getAvailableUsers()
SchedulingService
getAvailableUsers
in interface SchedulingService
public void setActive(boolean active)
SchedulingService
This method affects only the current run of each server. After server restart the
state of scheduling is defined by ServerConfig#getSchedulingActive()
configuration parameter.
setActive
in interface SchedulingService
active
- true to activate schedulingpublic void setActive(ScheduledTask task, boolean active)
SchedulingService
setActive
in interface SchedulingService
task
- task instanceactive
- true to activatepublic void setActive(java.util.Set<ScheduledTask> tasks, boolean active)
SchedulingService
setActive
in interface SchedulingService
tasks
- task instancesactive
- true to activate