001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2011-2011 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.server.monitor; 011 012import mondrian.server.Locus; 013 014/** 015 * Event created just after Mondrian has executed a SQL statement. 016 */ 017public class SqlStatementExecuteEvent extends SqlStatementEvent { 018 public final long executeNanos; 019 020 /** 021 * Creates a SqlStatementExecuteEvent. 022 * 023 * @param timestamp Timestamp 024 * @param statementId Statement id 025 * @param locus Locus of event 026 * @param sql SQL 027 * @param purpose Why Mondrian is executing this statement 028 * @param executeNanos Execution time 029 */ 030 public SqlStatementExecuteEvent( 031 long timestamp, 032 long statementId, 033 Locus locus, 034 String sql, 035 Purpose purpose, 036 long executeNanos) 037 { 038 super(timestamp, statementId, locus, sql, purpose); 039 this.executeNanos = executeNanos; 040 } 041 042 public String toString() { 043 return "SqlStatementExecuteEvent(" + sqlStatementId + ")"; 044 } 045 046 public <T> T accept(Visitor<T> visitor) { 047 return visitor.visit(this); 048 } 049} 050 051// End SqlStatementExecuteEvent.java