1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.indexing;
14 import org.eclipse.core.runtime.Platform;
17 * Contains indexing-related debugging and tracing flags.
19 * @author Tuukka Lehtonen
21 public final class IndexPolicy {
23 // General debug flag for the plugin
24 public static boolean DEBUG = false;
26 public static boolean DEBUG_INDEX_INIT = false;
27 public static boolean TRACE_INDEX_MANAGEMENT = false;
28 public static boolean TRACE_INDEX_INIT = false;
29 public static boolean TRACE_INDEX_LOAD = false;
30 public static boolean TRACE_INDEX_LOCKING = false;
31 public static boolean TRACE_INDEX_UPDATE = false;
32 public static boolean PERF_INDEX_INIT = false;
33 public static boolean PERF_INDEX_LOAD = false;
34 public static boolean PERF_INDEX_UPDATE = false;
35 public static boolean PERF_INDEX_QUERY = false;
38 if (Activator.getDefault().isDebugging()) {
40 String sTrue = Boolean.TRUE.toString();
42 DEBUG_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/debug/indexInit")); //$NON-NLS-1$
43 TRACE_INDEX_MANAGEMENT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexManagement")); //$NON-NLS-1$
44 TRACE_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexInit")); //$NON-NLS-1$
45 TRACE_INDEX_LOAD = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexLoad")); //$NON-NLS-1$
46 TRACE_INDEX_LOCKING = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexLocking")); //$NON-NLS-1$
47 TRACE_INDEX_UPDATE = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/trace/indexUpdate")); //$NON-NLS-1$
48 PERF_INDEX_INIT = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexInit")); //$NON-NLS-1$
49 PERF_INDEX_LOAD = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexLoad")); //$NON-NLS-1$
50 PERF_INDEX_UPDATE = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexUpdate")); //$NON-NLS-1$
51 PERF_INDEX_QUERY = sTrue.equalsIgnoreCase(Platform.getDebugOption(Activator.BUNDLE_ID + "/perf/indexQuery")); //$NON-NLS-1$