oracle.jbo.mom
Class LongRunningStatementHandle
java.lang.Object
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
| 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 |
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
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
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
Copyright © 1997, 2005, Oracle. All rights reserved.