Package pt.opensoft.util

Examples of pt.opensoft.util.Timer.stop()


        throw new SocketTimeoutException();
      }
      ex = e;
      throw e;
    } finally {
      timer.stop();
      boolean tooLong = (this.threshold > 0 && timer.ellapsed() > this.threshold);
      if (tooLong) {
        this.logger.push("too long");
      }
      if (timeout) {
View Full Code Here


        sendTimer.stop();
        logger.finer(sendTimer.ellapsed(), "[SENT] {" + request + "} (len=" + request.length() + ")");
        receiveTimer.start();
        response = socket.read();
        response = transformResponse(response);
                receiveTimer.stop();
      } finally {
        socket.close();
                totalTimer.stop();
      }
    } catch (InterruptedIOException e) {
View Full Code Here

    } catch (InterruptedIOException e) {
      logger.error(e);
      // s� mostra o erro se a mensagem n�o tiver dados confidenciais (ex: login)
        logger.error(sendTimer.ellapsed(), "[SENT] {" + request + "} (len=" + request.length() + ")");
      if (response != null && logger.getLevel().getLevel() < Level.FINER.getLevel()) {
                receiveTimer.stop();
                totalTimer.stop();
                if (threshold > 0 && !tooLongAlreadyDumped && totalTimer.ellapsed() > threshold){
                    logger.push("too long");
                    tooLongAlreadyDumped = true;
                }
View Full Code Here

      // s� mostra o erro se a mensagem n�o tiver dados confidenciais (ex: login)
   
      logger.error(sendTimer.ellapsed(), "[SENT] {" + request + "}");
   
      if (response != null && logger.getLevel().getLevel() < Level.FINER.getLevel()) {
                receiveTimer.stop();
                totalTimer.stop();
                if (threshold > 0 && !tooLongAlreadyDumped && totalTimer.ellapsed() > threshold){
                    logger.push("too long");
                    tooLongAlreadyDumped = true;
                }
View Full Code Here

            results = _stmt.executeBatch();
        } catch (SQLException e) {
            ex = e;
            throw e;
        } finally {
            timer.stop();
            boolean tooLong = (_dbc.getThreshold() > 0 && timer.ellapsed() > _dbc.getThreshold());
            if (tooLong) logger.push("too long");
            if (ex != null) {
                logger.error(timer.ellapsed(), getSQLString() + " -> " + ex.getMessage());
            } else if (tooLong) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.