Oracle Data Mining Java API Reference
10g Release 1 (10.1)

B12276-01

oracle.dmt.odm.task
Interface ExecutionHandle


public interface ExecutionHandle

An ExecutionHandle serves as a handle for the application that can be used to monitor or cancel a task execution. An instance of ExecutionHandle will be created when a mining task is executed in the DMS. Client application can use this handle to monitor the task execution in the DMS. It also provides the methods to terminate the task execution and wait for completion of the task.

This class is introduced in 10.1.0 to give the capability to re-execute a task.

Since:
10.1.0

Method Summary
 long getDurationInSeconds(Connection dmsConn)
          Returns the duration of execution for the associated task in the unit of seconds.
 java.lang.String getID()
          Returns the id of the execution handle.
 MiningTaskStatus getLatestStatus(Connection dmsConn)
          Returns the latest status of the task execution handle.
 TaskStatusHistory getStatusHistory(Connection dmsConn)
          Returns TaskStatusHistory giving access to the full history of the task.
 java.lang.String getTaskName()
          Returns the name of the task associated with this execution handle
 MiningTaskStatus terminate(Connection dmsConn)
          Terminates a queued/initiated/executing task in the DMS.
 MiningTaskStatus waitForCompletion(Connection dmsConn, long timeoutInSeconds)
          Waits for the task completion after executing the task.

 

Method Detail

terminate

public MiningTaskStatus terminate(Connection dmsConn)
                                               throws InvalidArgumentException,
MiningTaskException,
                                                      java.sql.SQLException
Terminates a queued/initiated/executing task in the DMS. If the task is in the queued state, this operation dequeues the task. If the task is in initiated/executing state, it terminates and rollsback the task-related operations.
Parameters:
dmsConn - Data mining server connection
Returns:
mining task status after performing termination.
Throws:
InvalidArgumentException - is thrown
- when the dmsConn is null
MiningTaskException - is thrown
- when the terminate operation failed.
SQLException - is thrown
- when there is a failure in the JDBC calls
InvalidArgumentException
MiningTaskException
java.sql.SQLException

getLatestStatus

public MiningTaskStatus getLatestStatus(Connection dmsConn)
                                                     throws InvalidArgumentException,
MiningTaskException,
                                                            java.sql.SQLException
Returns the latest status of the task execution handle.
Parameters:
dmsConn - Data mining server connection
Returns:
latest task execution handle status
Throws:
InvalidArgumentException - is thrown
- when the arguments are null
MiningTaskException - is thrown
- when the task execution is in invalid state
SQLException - is thrown
- when there is a failure in the JDBC calls
InvalidArgumentException
MiningTaskException
java.sql.SQLException

getStatusHistory

public TaskStatusHistory getStatusHistory(Connection dmsConn)
                                                       throws InvalidArgumentException,
MiningTaskException,
                                                              java.sql.SQLException
Returns TaskStatusHistory giving access to the full history of the task.
Parameters:
dmsConn - Data mining server connection
Returns:
state transition history of the task execution handle
Throws:
InvalidArgumentException - is thrown
- when the arguments are null
MiningTaskException - is thrown
- when the task execution is in invalid state
SQLException - is thrown
- when there is a failure in the JDBC calls
InvalidArgumentException
MiningTaskException
java.sql.SQLException

waitForCompletion

public MiningTaskStatus waitForCompletion(Connection dmsConn,
                                          long timeoutInSeconds)
                                                       throws InvalidArgumentException,
MiningTaskException,
                                                              java.sql.SQLException
Waits for the task completion after executing the task. It also allows the user to specify a timeout in seconds. If the task is not completed by the timeout period, this method returns the mining task status at the timeout.
Parameters:
dmsConn - Data mining server connection
Returns:
status of the task when the method returns
Throws:
InvalidArgumentException - is thrown
- when the dmsConn is null
MiningTaskException - is thrown
- when the task is not executed i.e., task is in ready state or not stored in the DMS
SQLException - is thrown
- when there is a failure in the JDBC calls
InvalidArgumentException
MiningTaskException
java.sql.SQLException

getID

public java.lang.String getID()
Returns the id of the execution handle.
Returns:
execution handle id.

getDurationInSeconds

public long getDurationInSeconds(Connection dmsConn)
                          throws InvalidArgumentException,
MiningTaskException,
                                 java.sql.SQLException
Returns the duration of execution for the associated task in the unit of seconds.
Returns:
execution duration
InvalidArgumentException
MiningTaskException
java.sql.SQLException

getTaskName

public java.lang.String getTaskName()
Returns the name of the task associated with this execution handle
Returns:
task name

Copyright © 2003 Oracle Corporation. All Rights Reserved.