public class LongRunningStatementHandle
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static int | CANCELLED | 
| static int | COMPLETED | 
| static int | RUNNING | 
| Constructor and Description | 
|---|
| LongRunningStatementHandle(long expiresAt,
                          java.sql.Statement stmt)Creates a new  LongRunningStatementHandleinstance. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | cancel()This method could be invoked by the  LongRunningStatementMonitorwhen 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 | 
public static final int COMPLETED
public static final int RUNNING
public static final int CANCELLED
public LongRunningStatementHandle(long expiresAt,
                          java.sql.Statement stmt)
LongRunningStatementHandle instance.expiresAt - the timestamp at which this statement expiresstmt - the JDBC Statement handlepublic void setState(int newState)
newState - valid values are COMPLETED, RUNNING or CANCELLEDpublic int getState()
public long getExpiryTime()
long timestamp valuepublic boolean cancel()
LongRunningStatementMonitor
 when the statement expires or from another thread when the
 user wants to cancel the statement.true if cancel succeeds, false otherwise