Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.6.2)
E26229-03


oracle.as.scheduler
Class SQLJobDetail

java.lang.Object
  extended by oracle.as.scheduler.SQLJobDetail

All Implemented Interfaces:
java.io.Serializable

public class SQLJobDetail
extends java.lang.Object
implements java.io.Serializable

This class contains database information associated with an ESS SQL job request. Most of the details are about the Oracle Scheduler job used to run the client's PL/SQL procedure.

The details returned by this class include information for the session used to retrieve the details and information obtained from Oracle Scheduler views. Not all Scheduler information will be available depending on the status of the Oracle Scheduler job.

The getUEnvXXX methods return information about the session used to retrieve the job details. Those details are obtained by calling SYS_CONTEXT function for the 'userenv' environment. These details will always be available.

The getSchedJobName and getSchedJobOwner methods return the name and owner of the Scheduler job. They will always be available as long as any information was available for the Oracle Scheduler job.

The other getSchedJobXXX methods return information obtained from the DBA_SCHEDULER_JOBS view. This information is available only when the Oracle Scheduler job is still exists. Those methods return null if the Oracle Scheduler job does not currently exist.

The getRunningJobXXX methods return information obtained from the DBA_SCHEDULER_RUNNING_JOBS view. This information is available only when the Oracle Scheduler job exists and is currently running. Those methods return null if the Oracle Scheduler job is not running.

The getRunDetailXXX methods return information obtained from the DBA_SCHEDULER_JOB_RUN_DETAIL view. This information is available once the Oracle Scheduler job has completed. Those methods return null if the Oracle Scheduler job has not completed and currently exists.

The getJobRunXXX methods return information for a job that is either running or has completed. Some methods return the same information, in some fashion, as that returned by one of the getRunningJobXXX or getRunDetailXXX method.

A easy way to determine which information is available is check whether certain methods return null; getSchedJobState, getRunningDBInstance, and getRunDetailStatus.

Since:
release specific (what release of product did this appear in)
Version:
$Header: ess/src/oracle/as/scheduler/SQLJobDetail.java /main/7 2010/10/26 13:46:46 kbittler Exp $
Author:
chall
See Also:
Serialized Form

Constructor Summary
protected SQLJobDetail(long requestId, java.lang.String uenvInstanceName, java.lang.String uenvServerHost, java.lang.String schedJobName, java.lang.String schedJobOwner, java.lang.String schedJobState, java.lang.String schedJobEnabled, java.lang.String schedJobClass, java.lang.String schedJobCreator, java.lang.Long runningSessionID, java.lang.Long runningSlaveProcessID, java.lang.String runningSlaveOSProcessID, java.lang.Long runningDBInstance, java.lang.String runningElapsedTime, java.lang.String runningCpuUsed, java.lang.String runningResourceConsumerGroup, java.lang.String runDetailStatus, java.lang.Integer runDetailError, java.util.Calendar runDetailReqStartDate, java.util.Calendar runDetailActualStartDate, java.lang.String runDetailRunDuration, java.lang.Long runDetailInstanceID, java.lang.String runDetailSessionID, java.lang.String runDetailSlavePID, java.lang.String runDetailCpuUsed, java.lang.String runDetailAdditionalInfo, java.lang.Long jobRunInstanceID, java.lang.String jobRunInstanceName, java.lang.Long jobRunSessionID)
          Construct a new object.

 

Method Summary
static SQLJobDetail from(javax.management.openmbean.CompositeData cd)
          Create an instance of the model specific class out of an associated CompositeData instance
 java.lang.Long getJobRunInstanceID()
          The database instance id on which the Oracle Scheduler job is running or was run if it has completed.
 java.lang.String getJobRunInstanceName()
          The name of the database instance on which the Oracle Scheduler job is running or was run if it has completed.
 java.lang.Long getJobRunSessionID()
          Gets the id of the session used to run the Oracle Scheduler job.
 long getRequestId()
          The ESS request identifier associated with these details.
 java.util.Calendar getRunDetailActualStartDate()
          Gets the actual start date to the Oracle Scheduler job run.
 java.lang.String getRunDetailAdditionalInfo()
          Gets additional information on the Oracle Scheduler job run.
 java.lang.String getRunDetailCpuUsed()
          Gets the amount of CPU used for the Oracle Scheduler job run.
 java.lang.Integer getRunDetailError()
          Gets the error number of a completed Oracle Scheduler job run.
 java.lang.Long getRunDetailInstanceID()
          Gets the identifier of the database instance on which the Oracle Scheduler job run.
 java.util.Calendar getRunDetailReqStartDate()
          Gets the requested start date to the Oracle Scheduler job run.
 java.lang.String getRunDetailRunDuration()
          Gets the duration of the Oracle Scheduler job run.
 java.lang.String getRunDetailSessionID()
          Gets the session identifier of the Oracle Scheduler job run.
 java.lang.String getRunDetailSlavePID()
          Gets the processor identifier of the slave on which the Oracle Scheduler job run.
 java.lang.String getRunDetailStatus()
          Gets the status of a completed Oracle Scheduler job run.
 java.lang.String getRunningJobCpuUsed()
          Gets the CPU time consumed for a running Oracle Scheduler job.
 java.lang.Long getRunningJobDBInstance()
          Gets the database instance number of the slave process running the Oracle Scheduler job.
 java.lang.String getRunningJobElapsedTime()
          Gets the elapsed time of a running Oracle Scheduler job since the job was started.
 java.lang.String getRunningJobResourceConsumerGroup()
          Gets the resource consumer group of the session in which the Oracle Scheduler job is running This returns null the Scheduler job is not currently running.
 java.lang.Long getRunningJobSessionID()
          Gets the identifier of the session running the Oracle Scheduler job.
 java.lang.String getRunningJobSlaveOSProcessID()
          Gets the process number of the OS slave process running the Oracle Scheduler job.
 java.lang.Long getRunningJobSlaveProcessID()
          Gets the process number of the slave process running the Oracle Scheduler job.
 java.lang.String getSchedJobClass()
          Gets the Oracle Scheduler job class associated with the job.
 java.lang.String getSchedJobCreator()
          Gets the creator of the Oracle Scheduler job.
 java.lang.String getSchedJobEnabled()
          Gets the Oracle Scheduler enabled state.
 java.lang.String getSchedJobName()
          The Oracle Scheduler job name used to run the ESS request.
 java.lang.String getSchedJobOwner()
          The owner of the Oracle Scheduler job.
 java.lang.String getSchedJobState()
          The state of the Oracle Scheduler job.
 java.lang.String getUEnvInstanceName()
          The database instance name used to retrieve these details.
 java.lang.String getUEnvServerHost()
          The host name of the machine running the database instance used to retrieve these details.
 javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
          Convert an instance of this model specific type to a CompositeData.
static javax.management.openmbean.CompositeType toCompositeType()
          Returns the CompositeType that describes this model specific class

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SQLJobDetail

protected SQLJobDetail(long requestId,
                       java.lang.String uenvInstanceName,
                       java.lang.String uenvServerHost,
                       java.lang.String schedJobName,
                       java.lang.String schedJobOwner,
                       java.lang.String schedJobState,
                       java.lang.String schedJobEnabled,
                       java.lang.String schedJobClass,
                       java.lang.String schedJobCreator,
                       java.lang.Long runningSessionID,
                       java.lang.Long runningSlaveProcessID,
                       java.lang.String runningSlaveOSProcessID,
                       java.lang.Long runningDBInstance,
                       java.lang.String runningElapsedTime,
                       java.lang.String runningCpuUsed,
                       java.lang.String runningResourceConsumerGroup,
                       java.lang.String runDetailStatus,
                       java.lang.Integer runDetailError,
                       java.util.Calendar runDetailReqStartDate,
                       java.util.Calendar runDetailActualStartDate,
                       java.lang.String runDetailRunDuration,
                       java.lang.Long runDetailInstanceID,
                       java.lang.String runDetailSessionID,
                       java.lang.String runDetailSlavePID,
                       java.lang.String runDetailCpuUsed,
                       java.lang.String runDetailAdditionalInfo,
                       java.lang.Long jobRunInstanceID,
                       java.lang.String jobRunInstanceName,
                       java.lang.Long jobRunSessionID)
Construct a new object.

Method Detail

getRequestId

public long getRequestId()
The ESS request identifier associated with these details.
Returns:
request identifier

getUEnvInstanceName

public java.lang.String getUEnvInstanceName()
The database instance name used to retrieve these details.
Returns:
database instance name

getUEnvServerHost

public java.lang.String getUEnvServerHost()
The host name of the machine running the database instance used to retrieve these details.
Returns:
machine host name

getSchedJobName

public java.lang.String getSchedJobName()
The Oracle Scheduler job name used to run the ESS request. This will never be null.
Returns:
the Oracle Scheduler job name

getSchedJobOwner

public java.lang.String getSchedJobOwner()
The owner of the Oracle Scheduler job. This will be null if no Oracle Scheduler job information is available.
Returns:
the name of the job owner, or null if no information is available

getSchedJobState

public java.lang.String getSchedJobState()
The state of the Oracle Scheduler job. This returns null if the Oracle Scheduler job associated with the ESS request does not exist, usualy either the Scheduler job has not been submitted or the Scheduler job has already completed.
Returns:
the Oracle Scheduler job state, or null if no information is available

getSchedJobEnabled

public java.lang.String getSchedJobEnabled()
Gets the Oracle Scheduler enabled state. This returns null if the Oracle Scheduler job associated with the ESS request does not exist, either the Scheduler job has not been submitted or the Scheduler job has already completed.
Returns:
the Scheduler job enabled state, or null if no information is available

getSchedJobClass

public java.lang.String getSchedJobClass()
Gets the Oracle Scheduler job class associated with the job. This returns null if the Oracle Scheduler job associated with the ESS request does not exist, usually either the Scheduler job has not been submitted or the Scheduler job has already completed.
Returns:
the Oracle Scheduler job class, or null if no information is available

getSchedJobCreator

public java.lang.String getSchedJobCreator()
Gets the creator of the Oracle Scheduler job. This returns null if the Oracle Scheduler job associated with the ESS request does not exist, usually either the Scheduler job has not been submitted or the Scheduler job has already completed.
Returns:
the creator of the Oracle Scheduler job, or null if no information is available

getRunningJobSessionID

public java.lang.Long getRunningJobSessionID()
Gets the identifier of the session running the Oracle Scheduler job. This returns null the Scheduler job is not currently running.
Returns:
the session identifer, or null if no information is available

getRunningJobSlaveProcessID

public java.lang.Long getRunningJobSlaveProcessID()
Gets the process number of the slave process running the Oracle Scheduler job. This returns null the Scheduler job is not currently running.
Returns:
the slave process number, or null if no information is available

getRunningJobSlaveOSProcessID

public java.lang.String getRunningJobSlaveOSProcessID()
Gets the process number of the OS slave process running the Oracle Scheduler job. This returns null the Scheduler job is not currently running.
Returns:
the slave OS process identifer, or null if no information is available

getRunningJobDBInstance

public java.lang.Long getRunningJobDBInstance()
Gets the database instance number of the slave process running the Oracle Scheduler job. This returns null the Scheduler job is not currently running.
Returns:
the database instance number, or null if no information is available

getRunningJobElapsedTime

public java.lang.String getRunningJobElapsedTime()
Gets the elapsed time of a running Oracle Scheduler job since the job was started. This returns null the Scheduler job is not currently running.

The format will be "DDD HH:MM:SS.ss" where DDD is the number of days, HH is the number of hours, MM is the number of minutes, SS.ss is the is the number of seconds (ss is fractional seconds).

Returns:
the elapsed time, or null if no information is available

getRunningJobCpuUsed

public java.lang.String getRunningJobCpuUsed()
Gets the CPU time consumed for a running Oracle Scheduler job. This returns null the Scheduler job is not currently running.

The format will be "DDD HH:MM:SS.ss" where DDD is the number of days, HH is the number of hours, MM is the number of minutes, SS.ss is the is the number of seconds (ss is fractional seconds).

Returns:
the elapsed time, or null if no information is available

getRunningJobResourceConsumerGroup

public java.lang.String getRunningJobResourceConsumerGroup()
Gets the resource consumer group of the session in which the Oracle Scheduler job is running This returns null the Scheduler job is not currently running.
Returns:
the resource consumer group, or null if no information is available

getRunDetailStatus

public java.lang.String getRunDetailStatus()
Gets the status of a completed Oracle Scheduler job run. This returns null if the job has not yet completed.
Returns:
the status of the job run, null if no information is available

getRunDetailError

public java.lang.Integer getRunDetailError()
Gets the error number of a completed Oracle Scheduler job run. This returns null if no error occurred, or the job has not yet completed.
Returns:
the error of the job run, or null if no information is available

getRunDetailReqStartDate

public java.util.Calendar getRunDetailReqStartDate()
Gets the requested start date to the Oracle Scheduler job run. This returns null if the job has not yet completed.
Returns:
the requested start date, or null if no information is available

getRunDetailActualStartDate

public java.util.Calendar getRunDetailActualStartDate()
Gets the actual start date to the Oracle Scheduler job run. This returns null if the job has not yet completed.
Returns:
the actual start date, or null if no information is available

getRunDetailRunDuration

public java.lang.String getRunDetailRunDuration()
Gets the duration of the Oracle Scheduler job run. This returns null if the job has not yet completed.

The format will be "DDD HH:MM:SS" where DDD is the number of days, HH is the number of hours, MM is the number of minutes, and SS is the number of seconds.

Returns:
the job run duration, or null if no information is available

getRunDetailInstanceID

public java.lang.Long getRunDetailInstanceID()
Gets the identifier of the database instance on which the Oracle Scheduler job run. This returns null if the job has not yet completed.
Returns:
the database instance id, or null if no information is available

getRunDetailSessionID

public java.lang.String getRunDetailSessionID()
Gets the session identifier of the Oracle Scheduler job run. This returns null if the job has not yet completed.

This returns value of xxx_SCHEDULER_JOB_RUN_DETAILS.SESSION_ID. That value appears to have a format of "xxx,yyy" that consist of two parts. The first part (xxx) represents the session id. The second part (yyy) represents the session serial number.

Returns:
the session identifer, or null if no information is available

getRunDetailSlavePID

public java.lang.String getRunDetailSlavePID()
Gets the processor identifier of the slave on which the Oracle Scheduler job run. This returns null if the job has not yet completed.
Returns:
the slave process identifer, or null if no information is available

getRunDetailCpuUsed

public java.lang.String getRunDetailCpuUsed()
Gets the amount of CPU used for the Oracle Scheduler job run. This returns null if the job has not yet completed.

The format is "DDD HH:MM:SS.ss" where DDD is the number of days, HH is the number of hours, MM is the number of minutes, SS.ss is the is the number of seconds (ss is fractional seconds).

Returns:
the amount of CPU used, or null if the information is not available

getRunDetailAdditionalInfo

public java.lang.String getRunDetailAdditionalInfo()
Gets additional information on the Oracle Scheduler job run. This returns null if no additional information is available, or the job has not yet completed
Returns:
additional job information (if any), or null if no information is available

getJobRunInstanceID

public java.lang.Long getJobRunInstanceID()
The database instance id on which the Oracle Scheduler job is running or was run if it has completed. This returns null if the job has not yet started.

This returns the same value as getRunningJobDBInstance if the Oracle Scheduler job is running, or getRunDetailInstanceID if the job has already completed.

Returns:
the database instance id, or null if no information is available

getJobRunInstanceName

public java.lang.String getJobRunInstanceName()
The name of the database instance on which the Oracle Scheduler job is running or was run if it has completed. This returns null if the job has not yet started.
Returns:
the database instance name, or null if no information is available

getJobRunSessionID

public java.lang.Long getJobRunSessionID()
Gets the id of the session used to run the Oracle Scheduler job. This returns null if the job has not yet started.

This returns the same value as getRunningJobSessionID if the Oracle Scheduler job is running, or the session ID portion of getRunDetailSessionID if the job has already completed.

Returns:
the session identifer, or null if no information is available

toCompositeType

public static javax.management.openmbean.CompositeType toCompositeType()
Returns the CompositeType that describes this model specific class

toCompositeData

public javax.management.openmbean.CompositeData toCompositeData(javax.management.openmbean.CompositeType ct)
Convert an instance of this model specific type to a CompositeData. This ensure that clients that do not have access to the model specific class can still use the MBean. The MXBean framework can perform this conversion automatically. However MXBeans are part of JDK 6.0 and AS11g is required to support JDK 5.0
Parameters:
ct - This parameter is there only for future compatibility reasons with JDK 6.0. It can be ignored at this point.

from

public static SQLJobDetail from(javax.management.openmbean.CompositeData cd)
                         throws java.lang.IllegalArgumentException
Create an instance of the model specific class out of an associated CompositeData instance
Throws:
java.lang.IllegalArgumentException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Enterprise Scheduler Service
11g Release 1 (11.1.1.6.2)
E26229-03


Copyright © 2008, 2012 Oracle. All rights reserved.