本文整理了Java中com.evolveum.midpoint.task.api.Task.getSchedule()
方法的一些代码示例,展示了Task.getSchedule()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getSchedule()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:getSchedule
[英]Returns the schedule.
[中]返回时间表。
代码示例来源:origin: Evolveum/midpoint
if (task.isCycle() && (task.getSchedule() == null ||
(task.getSchedule().getInterval() == null && task.getSchedule().getCronLikePattern() == null))) {
return null;
.withIdentity(createTriggerKeyForTask(task));
if (task.getSchedule() != null) {
Date est = task.getSchedule().getEarliestStartTime() != null ?
task.getSchedule().getEarliestStartTime().toGregorianCalendar().getTime() :
null;
Date lst = task.getSchedule().getLatestStartTime() != null ?
task.getSchedule().getLatestStartTime().toGregorianCalendar().getTime() :
null;
if (task.getSchedule().getLatestFinishTime() != null) {
tb.endAt(task.getSchedule().getLatestFinishTime().toGregorianCalendar().getTime());
ScheduleType sch = task.getSchedule();
if (sch == null) {
return null;
tb.usingJobData("schedule", scheduleFingerprint(task.getSchedule()));
tb.usingJobData("looselyBoundRecurrent", looselyBoundRecurrent);
tb.usingJobData("handlerUri", task.getHandlerUri());
代码示例来源:origin: Evolveum/midpoint
public void scheduleRunnableTaskNow(Task task, OperationResult parentResult) {
OperationResult result = parentResult.createSubresult(DOT_CLASS + "scheduleRunnableTaskNow");
if (task.getExecutionStatus() != TaskExecutionStatus.RUNNABLE) {
String message = "Task " + task + " cannot be scheduled, because it is not in RUNNABLE state.";
result.recordFatalError(message);
LOGGER.error(message);
return;
}
// for loosely-bound, recurring, interval-based tasks we reschedule the task in order to start immediately
// and then continue after specified interval (i.e. NOT continue according to original schedule) - MID-1410
if (!getConfiguration().isRunNowKeepsOriginalSchedule() && task.isLooselyBound() && task.isCycle() && task.getSchedule() != null
&& task.getSchedule().getInterval() != null && task.getSchedule().getInterval() != 0) {
LOGGER.trace("'Run now' for task invoked: unscheduling and rescheduling it; task = {}", task);
unscheduleTask(task, result);
((TaskQuartzImpl) task).setRecreateQuartzTrigger(true);
synchronizeTask((TaskQuartzImpl) task, result);
} else {
// otherwise, we simply add another trigger to this task
addTriggerNowForTask(task, result);
}
result.recordSuccessIfUnknown();
}
代码示例来源:origin: Evolveum/midpoint
AssertJUnit.assertEquals("Schedule after 2xPUSH is not OK", st2, task001.getSchedule());
AssertJUnit.assertEquals("Number of handlers is not OK", 3, task.getHandlersCount());
UriStack us = task.getOtherHandlersUriStack();
task001.refresh(result);
AssertJUnit.assertEquals("Handler URI after first POP is not correct", "http://no-handler.org/1", task001.getHandlerUri());
AssertJUnit.assertEquals("Schedule after first POP is not correct", st1, task001.getSchedule());
AssertJUnit.assertEquals("Binding after first POP is not correct", TaskBinding.TIGHT, task001.getBinding());
AssertJUnit.assertNotSame("Task state after first POP should not be CLOSED", TaskExecutionStatus.CLOSED, task001.getExecutionStatus());
task001.refresh(result);
AssertJUnit.assertEquals("Handler URI after second POP is not correct", "http://no-handler.org/", task001.getHandlerUri());
AssertJUnit.assertEquals("Schedule after second POP is not correct", st0, task001.getSchedule());
AssertJUnit.assertEquals("Binding after second POP is not correct", TaskBinding.LOOSE, task001.getBinding());
AssertJUnit.assertNotSame("Task state after second POP should not be CLOSED", TaskExecutionStatus.CLOSED, task001.getExecutionStatus());
内容来源于网络,如有侵权,请联系作者删除!