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-2012 Pentaho and others 008// All Rights Reserved. 009*/ 010package mondrian.util; 011 012import java.util.*; 013import java.util.concurrent.atomic.AtomicLong; 014 015/** 016 * A collection of counters. Used internally for logging and 017 * consistency-checking purposes. Should not be relied upon by applications. 018 */ 019public abstract class Counters { 020 /** Number of times {@code SqlStatement.execute} has completed 021 * successfully. */ 022 public static final AtomicLong SQL_STATEMENT_EXECUTE_COUNT = 023 new AtomicLong(); 024 025 /** Number of times {@code SqlStatement.close} has been called. */ 026 public static final AtomicLong SQL_STATEMENT_CLOSE_COUNT = new AtomicLong(); 027 028 /** Ids of all {@code SqlStatement} instances that are executing. */ 029 public static final Set<Long> SQL_STATEMENT_EXECUTING_IDS = 030 Collections.synchronizedSet(new HashSet<Long>()); 031} 032 033// End Counters.java