Parent Directory | Revision Log | Patch
--- incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java 2005/05/02 05:18:08 165584 +++ incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java 2005/05/02 06:25:59 165585 @@ -19,37 +19,33 @@ */ package org.apache.derby.client.am; -public class QueryTimerTask extends java.util.TimerTask -{ - private Statement statement_; - private java.util.Timer timer_; +public class QueryTimerTask extends java.util.TimerTask { + private Statement statement_; + private java.util.Timer timer_; - public QueryTimerTask (Statement statement, java.util.Timer timer) - { - statement_ = statement; - timer_ = timer; - } + public QueryTimerTask(Statement statement, java.util.Timer timer) { + statement_ = statement; + timer_ = timer; + } - public void run () - { - timer_.cancel(); // method call on java.util.Timer to kill the timer thread that triggered this task thread - try { - statement_.cancel(); // jdbc cancel - } - catch (SqlException e) { - SqlWarning warning = new SqlWarning (statement_.agent_.logWriter_, - "An exception occurred while trying to cancel a statement that has timed out." + - " See chained SQLException."); - warning.setNextException (e); - statement_.accumulateWarning (warning); - } - boolean notYetRun = this.cancel(); // method call on java.util.TimerTask to kill this task thread. - if (notYetRun) { - // The following is most likely just a bugcheck - but we'll see. - // May be able to remove it later. - SqlWarning warning = new SqlWarning (statement_.agent_.logWriter_, - "An unexpected error occurred while trying to cancel a statement that has timed out."); - statement_.accumulateWarning (warning); + public void run() { + timer_.cancel(); // method call on java.util.Timer to kill the timer thread that triggered this task thread + try { + statement_.cancel(); // jdbc cancel + } catch (SqlException e) { + SqlWarning warning = new SqlWarning(statement_.agent_.logWriter_, + "An exception occurred while trying to cancel a statement that has timed out." + + " See chained SQLException."); + warning.setNextException(e); + statement_.accumulateWarning(warning); + } + boolean notYetRun = this.cancel(); // method call on java.util.TimerTask to kill this task thread. + if (notYetRun) { + // The following is most likely just a bugcheck - but we'll see. + // May be able to remove it later. + SqlWarning warning = new SqlWarning(statement_.agent_.logWriter_, + "An unexpected error occurred while trying to cancel a statement that has timed out."); + statement_.accumulateWarning(warning); + } } - } }
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |