/** * Set up this profile listener before it is active. */ public void setOwner(SpiEbeanServer server, ServerConfig serverConfig) { this.server = server; this.logging = new DefaultAutoFetchManagerLogging(serverConfig, this); AutofetchConfig autofetchConfig = serverConfig.getAutofetchConfig(); useFileLogging = autofetchConfig.isUseFileLogging(); queryTuning = autofetchConfig.isQueryTuning(); queryTuningAddVersion = autofetchConfig.isQueryTuningAddVersion(); profiling = autofetchConfig.isProfiling(); profilingMin = autofetchConfig.getProfilingMin(); profilingBase = autofetchConfig.getProfilingBase(); setProfilingRate(autofetchConfig.getProfilingRate()); defaultGarbageCollectionWait = (long) autofetchConfig.getGarbageCollectionWait(); // determine the mode to use when Query.setAutoFetch() was // not explicitly set mode = autofetchConfig.getMode(); if (profiling || queryTuning) { // log the guts of the autoFetch setup String msg = "AutoFetch queryTuning[" + queryTuning + "] profiling[" + profiling + "] mode[" + mode + "] profiling rate[" + profilingRate + "] min[" + profilingMin + "] base[" + profilingBase + "]"; logging.logToJavaLogger(msg); } }
/** * Set up this profile listener before it is active. */ public void setOwner(SpiEbeanServer server, ServerConfig serverConfig) { this.server = server; this.logging = new DefaultAutoFetchManagerLogging(serverConfig, this); AutofetchConfig autofetchConfig = serverConfig.getAutofetchConfig(); useFileLogging = autofetchConfig.isUseFileLogging(); queryTuning = autofetchConfig.isQueryTuning(); queryTuningAddVersion = autofetchConfig.isQueryTuningAddVersion(); profiling = autofetchConfig.isProfiling(); profilingMin = autofetchConfig.getProfilingMin(); profilingBase = autofetchConfig.getProfilingBase(); setProfilingRate(autofetchConfig.getProfilingRate()); defaultGarbageCollectionWait = (long) autofetchConfig.getGarbageCollectionWait(); // determine the mode to use when Query.setAutoFetch() was // not explicitly set mode = autofetchConfig.getMode(); if (profiling || queryTuning) { // log the guts of the autoFetch setup String msg = "AutoFetch queryTuning[" + queryTuning + "] profiling[" + profiling + "] mode[" + mode + "] profiling rate[" + profilingRate + "] min[" + profilingMin + "] base[" + profilingBase + "]"; logging.logToJavaLogger(msg); } }