]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db/src/org/simantics/db/DevelopmentKeys.java
Multiple readers and variable optimization
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / DevelopmentKeys.java
1 package org.simantics.db;
2
3 import org.simantics.databoard.Bindings;
4 import org.simantics.utils.Development;
5
6 public class DevelopmentKeys {
7
8         final public static String PRINT = "Development.print";
9
10         final public static String LOGGER_ECHO = trickToInitialize();
11         
12         final public static String WRITEGRAPH_DEBUG = "WriteGraph.debug";
13         final public static String WRITEGRAPH_DEBUG_NAMES = "WriteGraph.debugNames";
14         final public static String WRITEGRAPH_DEBUG_STACK = "WriteGraph.debugStack";
15
16         final public static String WRITEGRAPH_EXCEPTION_STACKTRACES = "WriteGraph.exceptionStacktraces";
17         
18         final public static String WRITELOGGER_LOG = "WriteLogger.log";
19
20         final public static String QUERYPROCESSOR_UPDATE = "QueryProcessor.update";
21
22         final public static String QUERYPROCESSOR_PUT = "QueryProcessor.put";
23
24         final public static String SESSION_LOG_WRITES = "Session.logWrites";
25
26         final public static String READGRAPH_COUNT = "ReadGraph.count";
27
28         final public static String CLUSTERTABLE_VALIDATE_ON_LOAD = "ClusterTable.validateOnLoad";
29
30         public static void initialize() {
31
32                 if(Development.DEVELOPMENT) {
33
34                         Development.setProperty(DevelopmentKeys.PRINT, true, Bindings.BOOLEAN);
35
36                         Development.setProperty(DevelopmentKeys.LOGGER_ECHO, false, Bindings.BOOLEAN);
37
38                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG, false, Bindings.BOOLEAN);
39                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_NAMES, false, Bindings.BOOLEAN);
40                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_DEBUG_STACK, false, Bindings.BOOLEAN);
41
42                         Development.setProperty(DevelopmentKeys.WRITEGRAPH_EXCEPTION_STACKTRACES, false, Bindings.BOOLEAN);
43
44                         Development.setProperty(DevelopmentKeys.READGRAPH_COUNT, false, Bindings.BOOLEAN);
45
46                         Development.setProperty(DevelopmentKeys.WRITELOGGER_LOG, false, Bindings.BOOLEAN);
47
48                         Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_UPDATE, false, Bindings.BOOLEAN);
49
50                         Development.setProperty(DevelopmentKeys.QUERYPROCESSOR_PUT, false, Bindings.BOOLEAN);
51
52                         Development.setProperty(DevelopmentKeys.SESSION_LOG_WRITES, false, Bindings.BOOLEAN);
53                         
54                         Development.setProperty(DevelopmentKeys.CLUSTERTABLE_VALIDATE_ON_LOAD, false, Bindings.BOOLEAN);
55                         
56                         
57
58                 }
59
60         }
61         // This enables to call initialize even if bundle activator is not yet called.
62         // This happens when calling from headless junit4 plugin driver and ProCoreServer process does not start.  
63         private static String trickToInitialize() {
64         return "Logger.echo"; 
65         }
66         static {
67         initialize();
68         }
69 }