|
Oracle Enterprise Scheduler Java API Reference 11g Release 1 (11.1.1.7) E26229-06 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RuntimeService
Runtime Service API. This API provides access to the runtime service for submitting and managing job requests and the job request history.
| Nested Class Summary | |
|---|---|
static class |
RuntimeService.QueryFieldField names to be used when querying the Runtime Store. |
| Field Summary | |
|---|---|
static boolean |
DEFAULT_EXECUTE_PASTThe default setting for EXECUTE_PAST. |
static int |
DEFAULT_PRIORITYThe default system priority associated with a request. |
static int |
DEFAULT_REPROCESS_DELAYThe default period, in minutes, in which processing must be postponed by a callout handler. |
static int |
DEFAULT_REQUEST_EXPIRATIONThe default expiration, in minutes, for a request. |
static int |
DEFAULT_RETRIESThe default number of times a failed request will be retried. |
| Method Summary | |
|---|---|
void |
cancelRequest(RuntimeServiceHandle handle, long requestId)Cancels the processing of a request that is not in a terminal state. |
java.util.Map |
checkRequestPrivilege(RuntimeServiceHandle handle, long[] requestIds, RuntimeDataPermission.Action... privileges)Check whether the current user has privilegs on the input requests identified by a list of request ids. |
void |
close(RuntimeServiceHandle handle)Closes the runtime handle. |
void |
close(RuntimeServiceHandle handle, boolean abort)Closes the runtime handle. |
void |
closeContent(RuntimeServiceHandle handle, ContentHandle contentHandle)Closes the previously opened log or output content and releases the handle. |
void |
deleteRequest(RuntimeServiceHandle handle, long requestId)Marks a submitted request as deleted. |
byte[] |
getBinaryContent(RuntimeServiceHandle handle, ContentHandle contentHandle, int maxBytes)Gets at most maxBytes bytes from the binary content. |
FailedExecutionResult |
getFailedExecutionResult(RuntimeServiceHandle handle, long requestId)Retrieves the result of the last failed execution attempt for the specified request which has been retried at least once. |
ContentDetail |
getLogContentDetail(RuntimeServiceHandle handle, long requestId)Gets the log content detail for the request. |
java.util.Set<java.lang.String> |
getLogicalApplicationNames(RuntimeServiceHandle handle)Get a list of all logical application names for ESS hosted applications currently deployed |
java.lang.String[] |
getLogLines(RuntimeServiceHandle handle, ContentHandle contentHandle, int maxLines)Gets at most maxLines lines from the request log, continuing from the last call to this method. |
java.util.List<ContentDetail> |
getOutputContentDetail(RuntimeServiceHandle handle, long requestId)Gets details for all output content for the request. |
ContentDetail |
getOutputContentDetail(RuntimeServiceHandle handle, long requestId, java.lang.String contentName)Gets details for the specified output content for the request. |
RequestDetail |
getRequestDetail(RuntimeServiceHandle handle, long requestId)Retrieves runtime details of the specified request. |
RequestDetail |
getRequestDetailBasic(RuntimeServiceHandle handle, long requestId)Retrieves basic runtime details of the specified request. |
RequestDetail[] |
getRequestDetails(RuntimeServiceHandle handle, long[] requestIds)Retrieves basic runtime details of the specified requests. |
java.lang.Object |
getRequestParameter(RuntimeServiceHandle handle, long requestId, java.lang.String name)Retrieves the value of a request parameter. |
java.util.Enumeration<java.lang.Long> |
getRequests(RuntimeServiceHandle handle, long requestId)Returns an enumeration of the request identifiers for those requests that have the specified request as their immediate parent and are associated with the current execution attempt of that parent request. |
State |
getRequestState(RuntimeServiceHandle handle, long requestId)Retrieves the current state of the specified request. |
char[] |
getTextContent(RuntimeServiceHandle handle, ContentHandle contentHandle, int maxChars)Gets at most maxChars lines from the log or output text content. |
void |
holdRequest(RuntimeServiceHandle handle, long requestId)Withholds further processing of a request that is in WAIT or READY state. |
boolean |
isHandleRollbackOnly(RuntimeServiceHandle handle)Determine if this handle has been marked such that the associated transaction can only be rolled back. |
boolean |
isStandaloneEnv(RuntimeServiceHandle handle)Returns whether the environment is standalone or fusion. |
void |
lockRequest(RuntimeServiceHandle handle, long requestId)Acquires a lock for the given request. |
RuntimeServiceHandle |
open()Allocates system resources for performing subsequent runtime operations. |
ContentHandle |
openLogContent(RuntimeServiceHandle handle, long requestId)Opens the request log to retrieve the log data. |
ContentHandle |
openOutputContent(RuntimeServiceHandle handle, long requestId, java.lang.String contentName)Opens the specified request output to retrieve the output data. |
void |
publishEvent(RuntimeServiceHandle handle, java.lang.String targetApplication, ApplicationEvent event)Publishes an application event to the event queue. |
void |
purgeRequest(RuntimeServiceHandle handle, long requestId)Deprecated. As of 11.1.1.3.0(D8B4) Purge not supported via runtime API. Always throws NotAllowedException |
java.util.Enumeration<java.lang.Long> |
queryRequests(RuntimeServiceHandle handle, Filter filter, RuntimeService.QueryField orderBy, boolean ascending)Retrieves an enumeration of the request identifers for all requests whose attribute and system properties match those specified by the query parameters |
void |
releaseRequest(RuntimeServiceHandle handle, long requestId)Releases a request from the HOLD state. |
void |
replaceSchedule(RuntimeServiceHandle handle, long requestId, MetadataObjectId scheduleId)Replace the current schedule for a request that has already been submitted. |
void |
replaceSchedule(RuntimeServiceHandle handle, long requestId, MetadataObjectId scheduleId, Schedule schedule, java.util.Calendar start, java.util.Calendar end)Replace the current schedule for a request that has already been submitted with a schedule. |
void |
replaceSchedule(RuntimeServiceHandle handle, long requestId, Schedule schedule)Replace the current schedule for a request that has already been submitted. |
void |
setHandleRollbackOnly(RuntimeServiceHandle handle)Modify the transaction associated with this handle such that the only possible outcome of the transaction is to roll back the transaction. |
void |
setRequestParameter(RuntimeServiceHandle handle, long requestId, java.lang.String name, java.lang.Object value)Sets the value of a request parameter for a specified request. |
long |
submitRequest(RuntimeServiceHandle handle, RequestExecutionContext context, java.lang.String description, MetadataObjectId definition, RequestParameters parameters)Submits a sub-request. |
long |
submitRequest(RuntimeServiceHandle handle, java.lang.String description, JobType.ExecutionType type, Schedule schedule, Trigger trigger, java.util.Calendar start, java.util.Calendar end, RequestParameters parameters)Adhoc job request submission using specified Schedule and Trigger instances. |
long |
submitRequest(RuntimeServiceHandle handle, java.lang.String description, MetadataObjectId definition, java.util.Calendar start, RequestParameters parameters)Creates a new job request using metadata definition of the job to run once on a specific time. |
long |
submitRequest(RuntimeServiceHandle handle, java.lang.String description, MetadataObjectId definition, MetadataObjectId trigger, java.util.Calendar start, java.util.Calendar end, RequestParameters parameters)Creates a new job request using metadata definitions of the job and associated trigger |
long |
submitRequest(RuntimeServiceHandle handle, java.lang.String description, MetadataObjectId definition, MetadataObjectId schedule, MetadataObjectId trigger, java.util.Calendar start, java.util.Calendar end, RequestParameters parameters)Creates a new job request using metadata definitions of the job, schedule and associated trigger. |
long |
submitRequest(RuntimeServiceHandle handle, java.lang.String description, MetadataObjectId definition, Schedule schedule, Trigger trigger, java.util.Calendar start, java.util.Calendar end, RequestParameters parameters)Adhoc job request submission using job definition from metadata. |
void |
updateRequestParameter(RuntimeServiceHandle handle, long requestId, java.lang.String name, java.lang.Object value)Updates the value of a request parameter for a specified request. |
void |
updateRequestStartEnd(RuntimeServiceHandle handle, long requestId, java.util.Calendar start, java.util.Calendar end)Replace the start and end time for a request that has already been submitted. |
| Field Detail |
|---|
static final int DEFAULT_REPROCESS_DELAY
static final int DEFAULT_PRIORITY
static final int DEFAULT_REQUEST_EXPIRATION
static final int DEFAULT_RETRIES
static final boolean DEFAULT_EXECUTE_PAST
| Method Detail |
|---|
RuntimeServiceHandle open()
throws RuntimeServiceException
The close operation closes the handle returned by this method, and that handle instance cannot be used for subsequent operations.
If this method is called in a non-transactional context, then the close operation will attempt to save (commit) or discard (rollback) the runtime store changes associated with that handle.
If this method is called within a transactional context, then it is the responsibility of the transaction manager to commit or rollback the changes.
RuntimeServiceException - if a RuntimeService subsystem failure
void close(RuntimeServiceHandle handle)
throws RuntimeServiceException
This method only commits changes, and only if the open operation that returned the handle was done in a non-transactional context. If it was a transactional context, then it is the responsibility of the transaction manager to commit or rollback the changes.
Once a close operation is performed on a handle instance, that handle cannot be used any subsequent operations.
handle - the resources associated with the RuntimeServiceHandle instance to be de-allocated.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
void close(RuntimeServiceHandle handle,
boolean abort)
throws RuntimeServiceException
This method only commits (saves) changes, and can only do so if the open operation that returned the handle was done in a non-transactional context. If it was a transactional context, then it is the responsibility of the transaction manager to commit or rollback the changes.
Once a close operation is performed on a handle instance, that handle cannot be used any subsequent operations.
handle - the resources associated with the RuntimeServiceHandle instance to be de-allocated.abort - true to discard any runtime store changes associated with this handle, or false to retain changes. This parameter has no effect if the open was done in a transactional context.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
long submitRequest(RuntimeServiceHandle handle,
java.lang.String description,
MetadataObjectId definition,
java.util.Calendar start,
RequestParameters parameters)
throws MetadataNotFoundException,
ValidationException,
RuntimeServiceException
A submitted request might be singleton or it might yield one or more child requests for a job set. In the later case, the single identifier returned by this method is the parent of all ensuing child requests.
handle - the runtime handle instance returned from a prior open call.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value cannot be defined in the job definition and is not required to be a human readable value.definition - the metadata identifier of a Job definition or JobSet definition for the request being submitted.start - the requested start time for the request. The request will not run prior to this time. If null, the current time will be used. If the request is meant to begin immediately, null should be specified.parameters - parameters specified as part of the request.MetadataNotFoundException - if any metadata specified for this operation was not found in the metadata repository.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
long submitRequest(RuntimeServiceHandle handle,
java.lang.String description,
MetadataObjectId definition,
MetadataObjectId trigger,
java.util.Calendar start,
java.util.Calendar end,
RequestParameters parameters)
throws MetadataNotFoundException,
ValidationException,
RuntimeServiceException
A submitted request might be singleton or it might yield one or more child requests if it is a job set. In the later case, the single identifier returned by this method is the parent of all ensuing child requests.
handle - the runtime handle instance returned from a prior open call.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value cannot be defined in the job definition and is not required to be a human readable value.definition - the metadata identifier of a job definition or job set for the request.trigger - the metadata identifier of job trigger to use, or null if none.start - the requested start time for the request. The request will not run prior to this time. If null, the current time will be used. If the request is meant to begin immediately, null should be specified.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect.parameters - request parameters specified as part of the request.MetadataNotFoundException - if any metadata specified for this operation was not found in the metadata repository.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
long submitRequest(RuntimeServiceHandle handle,
java.lang.String description,
MetadataObjectId definition,
MetadataObjectId schedule,
MetadataObjectId trigger,
java.util.Calendar start,
java.util.Calendar end,
RequestParameters parameters)
throws MetadataNotFoundException,
ValidationException,
RuntimeServiceException
A submitted request might be singleton or it might yield one or more child requests viz. recurring schedules, trigger-based submission and job sets. In the later cases, the single identifier returned is the parent of all ensuing child requests.
handle - the runtime handle instance returned from a prior open call.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value cannot be defined in the job definition and is not required to be a human readable value.definition - the name of a job definition or job set to use from metadata.schedule - the name of the job schedule to use from metadata.trigger - the name of job trigger to use from metadata.start - the requested start time for the request. The request will not run prior to this time. The value may also, in some cases, be used to fill in missing recurrence fields for a recurring schedule. If null, the current time will be used. If the request is meant to begin immediately, null should be specified. The start time applies to both Schedule and Trigger, if present.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect. The end time applies to both the Schedule and Trigger, if present.parameters - request parameters specified as part of the request.MetadataNotFoundException - if any metadata specified for this operation was not found in the metadata repository.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
long submitRequest(RuntimeServiceHandle handle,
java.lang.String description,
JobType.ExecutionType type,
Schedule schedule,
Trigger trigger,
java.util.Calendar start,
java.util.Calendar end,
RequestParameters parameters)
throws ValidationException,
RuntimeServiceException
A submitted request might be singleton or it might yield one or more child requests viz. recurring schedules, trigger-based submission and job sets. In the later cases, the single identifier returned is the parent of all ensuing child requests.
handle - the runtime handle instance returned from a prior open call.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value is not required to be a human readable value.type - must be one of the base types values viz. JAVA_TYPE, SQL_TYPE and PROCESS_TYPE specified by JobType enum.schedule - the instance of Schedule object, or null if none.trigger - the instance of Trigger object, or null if none.start - the requested start time for the request. The request will not run prior to this time. The value may also, in some cases, be used to fill in missing recurrence fields for a recurring schedule. If null, the current time will be used. If the request is meant to begin immediately, null should be specified. The start time applies to both Schedule and Trigger if present.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect. The end time applies to both the Schedule and Trigger definitions, if specified.parameters - request parameters specified as part of the request.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
long submitRequest(RuntimeServiceHandle handle,
java.lang.String description,
MetadataObjectId definition,
Schedule schedule,
Trigger trigger,
java.util.Calendar start,
java.util.Calendar end,
RequestParameters parameters)
throws MetadataNotFoundException,
ValidationException,
RuntimeServiceException
A submitted request might be singleton or it might yield one or more child requests viz. recurring schedules, trigger-based submission and job sets. In the later cases, the single identifier returned is the parent of all ensuing child requests.
handle - the runtime handle instance returned from a prior open call.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value cannot be defined in the job definition and is not required to be a human readable value.definition - the Metadata Object Id, identifying the job definition as stored in metadata.schedule - instance of schedule object.trigger - the instance of Trigger object.start - the requested start time for the request. The request will not run prior to this time. The value may also, in some cases, be used to fill in missing recurrence fields for a recurring schedule. If null, the current time will be used. If the request is meant to begin immediately, null should be specified. The start time applies to both the Schedule and Trigger, if present.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect. The end time applies to both the Schedule and Trigger, if present.parameters - request parameters specified as part of the request.MetadataNotFoundException - if any metadata specified for this operation was not found in the metadata repository.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
long submitRequest(RuntimeServiceHandle handle,
RequestExecutionContext context,
java.lang.String description,
MetadataObjectId definition,
RequestParameters parameters)
throws MetadataNotFoundException,
ValidationException,
RuntimeServiceException
Passing the execution context ties the request being submitted to the currently running request. After submitting the sub request, the submitting (parent) request should throw an ExecutionPausedException that will pause the request and trigger the execution of sub-request. Upon completion of the sub-request, the parent request will be resumed.
handle - the runtime handle instance returned from a prior open call.context - the execution context of the running request that is submitting the sub-request.description - an optional search description for the request. This is primarily a search tag specific to this request. See RuntimeService.QueryField.NAME. This value cannot be defined in the job definition and is not required to be a human readable value.definition - the Metadata Object Id, identifying the job definition, as stored in metadata, for the sub-request.parameters - request parameters specified a part of the request.MetadataNotFoundException - if any metadata specified for this operation was not found in the metadata repository.ValidationException - if the request validation failed.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
java.lang.Object getRequestParameter(RuntimeServiceHandle handle,
long requestId,
java.lang.String name)
throws RequestNotFoundException,
ValidationException,
RuntimeServiceException
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the request.name - the name of the System property or user request parameter to retrieve.RequestNotFoundException - if the request was not foundValidationException - if the name parameter does not exist, or name does not represent a valid system property.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
void lockRequest(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
The method can be used to ensure data consistency when updating request parameters or system properties.
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the request.RequestNotFoundException - if the request was not foundRuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
void updateRequestParameter(RuntimeServiceHandle handle,
long requestId,
java.lang.String name,
java.lang.Object value)
throws RequestNotFoundException,
ValidationException,
RuntimeServiceException
This operation fails if the request parameter does not already exist.
This operation is subject to any read-only constraint on the parameter being updated and an error occurs if the parameter is read-only.
This operation applies to only the target request. It does not cascade to any other requests that may be associated with the request.
This operation acquires a lock for the given request. The lock is released when close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the request.name - the name of the parameter to modify.value - the new value of the parameter.RequestNotFoundException - if the request was not foundValidationException - if parameter validation fails.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null.RollbackException - if handle has been marked for rollback only.
void setRequestParameter(RuntimeServiceHandle handle,
long requestId,
java.lang.String name,
java.lang.Object value)
throws RequestNotFoundException,
ValidationException,
RuntimeServiceException
The parameter will be added if it does not already exist, otherwise the value of the parameter will be updated.
This operation is subject to any read-only constraint on the parameter being set and an error occurs if the parameter already exists and is read-only.
This operation applies to only the target request. It does not cascade to any other requests that may be associated with the request.
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the request.name - the name of the parameter to set.value - the new value of the parameter.RequestNotFoundException - if the request was not foundValidationException - if parameter validation fails.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null.RollbackException - if handle has been marked for rollback only.
State getRequestState(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the request.State of the requestRequestNotFoundException - if the request was not foundRuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
FailedExecutionResult getFailedExecutionResult(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
handle - runtime handle instance returned from a prior open call.requestId - request identifier of the request.FailedExecutionResult of the last failed execution attempt for the request.RequestNotFoundException - if no failed execution history was found for the request, meaning the request has not been retriedRuntimeServiceException - if a RuntimeService subsystem failure occured or handle is null
java.util.Enumeration<java.lang.Long> getRequests(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the target request.requestId as the immediate parent.RequestNotFoundException - if the request was not found.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
RequestDetail getRequestDetail(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
MetadataNotFoundException,
RuntimeServiceException
handle - the runtime handle instance returned from a prior (@code open} call.requestId - the request identifier of the requestRequestNotFoundException - if the request was not found.MetadataNotFoundException - if any metadata referenced for this operation was not found in the metadata repository.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
RequestDetail getRequestDetailBasic(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
RequestDetail returned by this method includes most of the information as getRequestDetail(oracle.as.scheduler.RuntimeServiceHandle, long), but certain less commonly used information is omitted to improve performance.
Specifically, the information returned by the following RequestDetail methods is not meaningful: getSchedule, getTrigger, getTriggerState, getTriggerEvaluationStatus
handle - the runtime handle instance returned from a prior open call.requestId - the request identifier of the requestRequestNotFoundException - if the request was not found.MetadataNotFoundException - if any metadata referenced for this operation was not found in the metadata repository.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
RequestDetail[] getRequestDetails(RuntimeServiceHandle handle,
long[] requestIds)
throws RequestNotFoundException,
RuntimeServiceException
RequestDetails returned by this method includes most of the information as getRequestDetail(oracle.as.scheduler.RuntimeServiceHandle, long), but certain less commonly used information is omitted to improve performance.
Specifically, the information returned by the following RequestDetail methods is not meaningful: getSchedule, getTrigger, getTriggerState, getTriggerEvaluationStatus
handle - the runtime handle instance returned from a prior open call.requestIds - the request identifier of the requestRequestNotFoundException - if the request was not found.MetadataNotFoundException - if any metadata referenced for this operation was not found in the metadata repository.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
java.util.Enumeration<java.lang.Long> queryRequests(RuntimeServiceHandle handle,
Filter filter,
RuntimeService.QueryField orderBy,
boolean ascending)
throws ValidationException,
RuntimeServiceException
If no filter is specifed, a default filter equivalent to the following is used:
new Filter(RuntimeService.QueryField.REQUESTID.fieldName(),
Filter.Comparator.NOT_EQUALS, null);
handle - the runtime handle instance returned from a prior open call.filter - specifies field/comparator/value combinations used as parameters for retrieving query results. If null, a default filter is used (see above).orderBy - the field to sort the results by.ascending - true if the ordering based on the given field should be ascending, or false for descending.ValidationException - if filter parameter validation fails.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null
java.util.Map checkRequestPrivilege(RuntimeServiceHandle handle,
long[] requestIds,
RuntimeDataPermission.Action... privileges)
throws ValidationException,
RuntimeServiceException
handle - runtimeServiceHandlerequestIds - the request ids to be checked.privileges - the ESS request data security privileges to be checked. If multiple privileges are provided, one request id check requestis passed only if the user has all the privileges on that request.ValidationExceptionRuntimeServiceException
void holdRequest(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
IllegalStateException,
NotAllowedException,
RuntimeServiceException
WAIT or READY state. For parent requests, this operation will cascade to all eligible child requests.handle - the runtime handle instance returned from a prior open call.requestId - the identifier of the request to hold.RequestNotFoundException - if the request was not found.IllegalStateException - if request is not in a compatible state.NotAllowedException - if this operation is not allowed on the specified request.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
void releaseRequest(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
IllegalStateException,
NotAllowedException,
RuntimeServiceException
HOLD state. For parent requests, this operation will cascade to all eligible child requests.handle - the runtime handle instance returned from a prior open call.requestId - the identifier of the request to release.RequestNotFoundException - if the request was not found.IllegalStateException - if request is not in a compatible state.NotAllowedException - if this operation is not allowed on the specified request.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
void cancelRequest(RuntimeServiceHandle handle,
long requestId)
throws IllegalStateException,
RequestNotFoundException,
RuntimeServiceException
For a singleton and child request in WAIT, READY, BLOCKED or HOLD state, this operation will cause them to go to CANCELLED state.
For a singleton and child request in RUNNING or COMPLETED state, cancellation is best effort and the state will go to a transitory CANCELLING state which will persist until the request has been cancelled and transitions to CANCELLED or some other terminal state.
For parent requests, this operation cascades to all its children.
handle - the runtime handle instance returned from a prior open call.requestId - the identifier of the request to cancel.RequestNotFoundException - if the request was not found.IllegalStateException - if request is already in a terminal state.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is null.RollbackException - if handle has been marked for rollback only.
void deleteRequest(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
IllegalStateException,
NotAllowedException,
RuntimeServiceException
The target request must be a submitted request that has finished and is in a terminal state. An error occurs if the target request is not in a terminal state, or if it is a child request of some kind, for example, a JobSet step, a sub-request, a Schedule instance request, or Trigger instance request.
This does not physically remove request data, although the request will no longer be accessible (visible) for most operations. purgeRequest can be used to physically remove the request.
handle - the runtime handle instance returned from a prior open call.requestId - the identifier of the request to delete.RequestNotFoundException - if the request was not found.IllegalStateException - if the operation cannot be performed due to the current state of the request.NotAllowedException - the this operation is not supported for the request.RuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.
@Deprecated
void purgeRequest(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
IllegalStateException,
NotAllowedException,
RuntimeServiceException
RequestNotFoundExceptionIllegalStateExceptionNotAllowedExceptionRuntimeServiceException
void publishEvent(RuntimeServiceHandle handle,
java.lang.String targetApplication,
ApplicationEvent event)
throws ValidationException,
RuntimeServiceException
handle - the runtime handle instance returned from a prior open call.targetApplication - the name of the target application to which this event is to be delivered.event - the event to be publishedValidationException - the event or target application name is null or invalidRuntimeServiceException - if a RuntimeService subsystem failure occurs or handle is nullRollbackException - if handle has been marked for rollback only.boolean isHandleRollbackOnly(RuntimeServiceHandle handle)
handle - the runtime handle being checked.true if this handle as been marked as rollback only, or false otherwise.void setHandleRollbackOnly(RuntimeServiceHandle handle)
handle - the runtime handle.
void replaceSchedule(RuntimeServiceHandle handle,
long requestId,
Schedule schedule)
throws RequestNotFoundException,
ValidationException,
RuntimeServiceException
The new schedule is an adhoc schedule. The old schedule could have been a metadata schedule or an adhoc schedule. This operation cannot be invoked on a singleton request with only a start time and no other schedule specified.
This can be used to replace the schedule for a request that is in WAIT or HOLD state.
All previously scheduled instances of this request that have not started running will be canceled. The new schedule will be effective immediately for scheduling new instances.
This operation acquires a lock for the given request. The lock is released when close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
handle - the runtime handle instance returned from a prior open call.requestId - the request whose schedule is to be replaced. This request must be a submitted request, not a generated request.schedule - the new schedule to use for this requestValidationException - if the schedule is not valid or if requestId is not for a submitted request or represents a request in an unsupported state for the operation.RequestNotFoundException - if requestId was not found.RuntimeServiceException - if a RuntimeService subsystem failure occurs
void replaceSchedule(RuntimeServiceHandle handle,
long requestId,
MetadataObjectId scheduleId)
throws RequestNotFoundException,
MetadataNotFoundException,
ValidationException,
RuntimeServiceException
The new schedule will be a schedule obtained from the metadata of the application that submitted the request. The old schedule could have been a metadata schedule or an adhoc schedule. This operation cannot be invoked on a singleton request with only a start time and no other schedule specified.
This can be used to replace the schedule for a request that is in WAIT or HOLD state.
All previously scheduled instances of this request that have not started running will be canceled. The new schedule will be effective immediately for scheduling new instances.
This operation acquires a lock for the given request. The lock is released when close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
handle - the runtime handle instance returned from a prior open call.requestId - the request whose schedule is to be replaced. This request must be a submitted request, not a generated request.scheduleId - a MetadataObjectId representing the new schedule to use for this requestValidationException - if the schedule is not valid or if requestId is not for a submitted request or represents a request in an unsupported state for the operation.RequestNotFoundException - if requestId was not found.RuntimeServiceException - if a RuntimeService subsystem failure occursMetadataNotFoundException - if the schedule metadata specified for this operation was not found in the metadata repository.
void replaceSchedule(RuntimeServiceHandle handle,
long requestId,
MetadataObjectId scheduleId,
Schedule schedule,
java.util.Calendar start,
java.util.Calendar end)
throws RequestNotFoundException,
MetadataNotFoundException,
ValidationException,
RuntimeServiceException
The new schedule will be a schedule obtained from the metadata of the application that submitted the request or an adhoc schedule. The old schedule could have been a metadata schedule or an adhoc schedule. This operation cannot be invoked on a singleton request that only had a start time and no other schedule.
Either scheduleId or schedule must be specified. See updateRequestStartEnd(oracle.as.scheduler.RuntimeServiceHandle, long, java.util.Calendar, java.util.Calendar).
This can be used to replace the schedule for a request that is in WAIT or HOLD state.
All previously scheduled instances of this request that have not started running will be canceled. The new schedule will be effective immediately for scheduling new instances.
This operation acquires a lock for the given request. The lock is released when close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
handle - the runtime handle instance returned from a prior open call.requestId - the request whose schedule is to be replaced. This request must be a submitted request, not a generated request.scheduleId - a MetadataObjectId representing the new schedule to use for this requestschedule - the new schedule to use for this requeststart - the new requested start time for the request. The request will not run prior to this time. If null, the current time will be used. If the request is meant to begin immediately, null should be specified.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect.ValidationException - if both scheduleId and schedule are null, the schedule is not valid or if requestId is not for a submitted request or represents a request in an unsupported state for the operation.RequestNotFoundException - if requestId was not found.RuntimeServiceException - if a RuntimeService subsystem failure occursMetadataNotFoundException - if the schedule metadata specified for this operation was not found in the metadata repository.
void updateRequestStartEnd(RuntimeServiceHandle handle,
long requestId,
java.util.Calendar start,
java.util.Calendar end)
throws RequestNotFoundException,
RuntimeServiceException,
ValidationException
This method should may be invoked for submitted requests whether or not they not have an associated schedule or trigger. If a schedule or trigger is associated with the request and it is to be changed, please see replaceSchedule(oracle.as.scheduler.RuntimeServiceHandle, long, oracle.as.scheduler.Schedule). If no schedule or trigger is associated with the request note that end has very little meaning. It is only used in validation to ensure that it does not come before start.
This operation acquires a lock for the given request. The lock is released when close operation is subsequently invoked or the encompassing transaction is committed.
If an application tries to invoke this operation while the lock is being held by another thread, this method will block until the lock is released.
handle - the runtime handle instance returned from a prior open call.requestId - the request whose schedule is to be replaced. This request must be a submitted request, not a generated request.start - the new requested start time for the request. The request will not run prior to this time. If null, the current time will be used. If the request is meant to begin immediately, null should be specified.end - the time past which this request or its child requests will not be dispatched for execution. If null, no end time is in effect.RequestNotFoundExceptionRuntimeServiceExceptionValidationException
java.util.Set<java.lang.String> getLogicalApplicationNames(RuntimeServiceHandle handle)
throws RuntimeServiceException
handle - the runtime handle instance returned from a prior open call.RuntimeServiceException - if a RuntimeService subsystem failure occurs
ContentDetail getLogContentDetail(RuntimeServiceHandle handle,
long requestId)
throws RequestNotFoundException,
RuntimeServiceException
handle - runtime service handle.requestId - request id.null if the log does not exist.RequestNotFoundException - if the request was not found.RuntimeServiceException - if a RuntimeService subsystem failure occurs.
ContentDetail getOutputContentDetail(RuntimeServiceHandle handle,
long requestId,
java.lang.String contentName)
throws RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.requestId - request id.contentName - name of output content.null if the content does not exist.RuntimeServiceException - if error accessing runtime store.RequestNotFoundException - if the request was not found
java.util.List<ContentDetail> getOutputContentDetail(RuntimeServiceHandle handle,
long requestId)
throws RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.requestId - request id.RuntimeServiceException - if error accessing runtime store.RequestNotFoundException - if the request was not found
ContentHandle openLogContent(RuntimeServiceHandle handle,
long requestId)
throws NotFoundException,
RuntimeServiceException
handle - runtime service handle.requestId - request id.RuntimeServiceException - if a RuntimeService subsystem failure occursNotFoundException - if the log does not exist.
ContentHandle openOutputContent(RuntimeServiceHandle handle,
long requestId,
java.lang.String contentName)
throws NotFoundException,
RuntimeServiceException
handle - runtime service handle.requestId - request id.contentName - name of the output content to open.RuntimeServiceException - if a RuntimeService subsystem failure occursNotFoundException - if the output content does not exist.
java.lang.String[] getLogLines(RuntimeServiceHandle handle,
ContentHandle contentHandle,
int maxLines)
throws IllegalArgumentException,
RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.contentHandle - content handle from previous call to openLogContent.maxLines - maximum number of lines to get.IllegalArgumentException - if handle is invalid.RuntimeServiceException - if a RuntimeService subsystem failure occursRequestNotFoundException - if the request was not found
char[] getTextContent(RuntimeServiceHandle handle,
ContentHandle contentHandle,
int maxChars)
throws IllegalArgumentException,
RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.contentHandle - content handle from previous call to openLogContent or openOutputContent.maxChars - maximum number of characters to get.IllegalArgumentException - if handle is invalid.RuntimeServiceException - if a RuntimeService subsystem failure occursRequestNotFoundException - if the request was not found
byte[] getBinaryContent(RuntimeServiceHandle handle,
ContentHandle contentHandle,
int maxBytes)
throws IllegalArgumentException,
RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.contentHandle - content handle from previous open call.maxBytes - maximum number of bytes to get.IllegalArgumentException - if handle is invalid.RuntimeServiceException - if a RuntimeService subsystem failure occursRequestNotFoundException - if the request was not found
void closeContent(RuntimeServiceHandle handle,
ContentHandle contentHandle)
throws IllegalArgumentException,
RuntimeServiceException,
RequestNotFoundException
handle - runtime service handle.contentHandle - content handle from previous call to openLogContent or openOutputContent.IllegalArgumentException - if handle is invalid.RuntimeServiceException - if a RuntimeService subsystem failure occursRequestNotFoundException - if the request was not found
boolean isStandaloneEnv(RuntimeServiceHandle handle)
throws RuntimeServiceException
handle - runtime service handle.RuntimeServiceException - if a RuntimeService subsystem failure occurs
|
Oracle Enterprise Scheduler Java API Reference 11g Release 1 (11.1.1.7) E26229-06 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||