public abstract class AbstractScheduleType extends Object
| Constructor and Description |
|---|
AbstractScheduleType(boolean concurrent,
boolean clustered,
String typeName)
Builds the schedule type.
|
| Modifier and Type | Method and Description |
|---|---|
static AbstractScheduleType |
create(boolean concurrent,
boolean clustered,
String scheduleType,
String scheduleTrigger)
Factory method that creates a concrete schedule type object based on the given parameters.
|
abstract String |
getScheduleTrigger()
Returns the string form of the trigger that causes the job to be invoked.
|
String |
getTypeName()
The name that identifies this type of schedule.
|
boolean |
isClustered()
If
true, the job may be executed on a server other than the one where the job was scheduled. |
boolean |
isConcurrent()
If true, multiple jobs can execute at any one time.
|
public AbstractScheduleType(boolean concurrent,
boolean clustered,
String typeName)
concurrent - if true, multiple jobs can run concurrently. If false, only one
scheduled job will run at any one time across the RHQ Server cloud.clustered - if true, the job may be executed by a server other than the one where the job was scheduledtypeName - the name of the concrete schedule type (subclasses must provide this)public static final AbstractScheduleType create(boolean concurrent, boolean clustered, String scheduleType, String scheduleTrigger)
concurrent - if true, multiple jobs can run concurrently.clustered - if true, the job may be executed by a server other than the one where the job was scheduledscheduleType - the name of the concrete schedule typescheduleTrigger - the string form of the schedule's triggerpublic String getTypeName()
public boolean isConcurrent()
public boolean isClustered()
true, the job may be executed on a server other than the one where the job was scheduled.
If false, the job will always be executed on the server where it was scheduled (it will be
considered a non-clustered job).
If this is false, isConcurrent() only affects the scheduler where the job is scheduled
and to be executed. This means a non-clustered job may run at the same time on different machines, even
if isConcurrent() is false. When isConcurrent() is false,
and isClustered() is false, it means that job will not run concurrently on the box
where it was scheduled. But if the job was scheduled multiple times on different boxes, those multiple jobs
can run concurrently because they are on different boxes.
A job should not be clustered if it must run on all servers at the same regular schedule.public abstract String getScheduleTrigger()
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.