Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

oracle.jbo.mom
Class LongRunningStatementHandle

java.lang.Object
  extended by oracle.jbo.mom.LongRunningStatementHandle

public class LongRunningStatementHandle
extends java.lang.Object

This class represents a handle to the cancellable SQL statements. Instances of this class are used to track long running statements and cancel them when they run too long or by user discretion.

Since:
JDeveloper 10.1.3

Field Summary
static int CANCELLED
           
static int COMPLETED
           
static int RUNNING
           
 
Constructor Summary
LongRunningStatementHandle(long expiresAt, java.sql.Statement stmt)
          Creates a new LongRunningStatementHandle instance.
 
Method Summary
 boolean cancel()
          This method could be invoked by the LongRunningStatementMonitor when the statement expires or from another thread when the user wants to cancel the statement.
 long getExpiryTime()
          Returns the timestamp at which the statement expires
 int getState()
          Returns the current state of the statement
 void setState(int newState)
          Change the statement's state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPLETED

public static final int COMPLETED
See Also:
Constant Field Values

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

CANCELLED

public static final int CANCELLED
See Also:
Constant Field Values
Constructor Detail

LongRunningStatementHandle

public LongRunningStatementHandle(long expiresAt,
                                  java.sql.Statement stmt)
Creates a new LongRunningStatementHandle instance.

Parameters:
expiresAt - the timestamp at which this statement expires
stmt - the JDBC Statement handle
Method Detail

setState

public void setState(int newState)
Change the statement's state

Parameters:
newState - valid values are COMPLETED, RUNNING or CANCELLED

getState

public int getState()
Returns the current state of the statement

Returns:
one of the possible states of COMPLETED, RUNNING or CANCELLED

getExpiryTime

public long getExpiryTime()
Returns the timestamp at which the statement expires

Returns:
a long timestamp value

cancel

public boolean cancel()
This method could be invoked by the LongRunningStatementMonitor when the statement expires or from another thread when the user wants to cancel the statement.

Returns:
true if cancel succeeds, false otherwise

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-04

Copyright © 1997, 2010, Oracle. All rights reserved.