/** * INTERNAL: * End the operation timing. */ public void endOperationProfile(String operationName, DatabaseQuery query, int weight) { if (this.isInProfile) { getProfiler().endOperationProfile(operationName, query, weight); } }
/** * INTERNAL: * Updates the count of SessionProfiler event */ @Override public void incrementProfile(String operationName) { if (this.isInProfile) { getProfiler().occurred(operationName, this); } }
/** * INTERNAL: * Start the operation timing. */ @Override public void startOperationProfile(String operationName) { if (this.isInProfile) { getProfiler().startOperationProfile(operationName); } }
/** * PUBLIC: * Set the profiler for the session. * This allows for performance operations to be profiled. */ public void setProfiler(SessionProfiler profiler) { this.profiler = profiler; if (profiler != null) { profiler.setSession(this); setIsInProfile(getProfiler().getProfileWeight() != SessionProfiler.NONE); // Clear cached flag that bypasses the profiler check. getIdentityMapAccessorInstance().getIdentityMapManager().checkIsCacheAccessPreCheckRequired(); } else { setIsInProfile(false); } }
/** * Return the DMS sensor weight * @return */ public int getProfileWeight() { if (getSession().isInProfile()) { return getSession().getProfiler().getProfileWeight(); } else { return 0; } }
/** * This method is used to change DMS sensor weight. */ public void setProfileWeight(int weight) { if (getSession().isInProfile()) { getSession().getProfiler().setProfileWeight(weight); } }
/** * INTERNAL: * Updates the value of SessionProfiler state */ @Override public void updateProfile(String operationName, Object value) { if (this.isInProfile) { getProfiler().update(operationName, value); } }
/** * INTERNAL: * This method includes all of the code that is issued before the datasource * is connected to. */ protected void preConnectDatasource(){ //Bug#3440544 Check if logged in already to stop the attempt to login more than once if (isLoggedIn) { throw ValidationException.alreadyLoggedIn(this.getName()); } this.platform = null; if (isInProfile()) { getProfiler().initialize(); } updateProfile(SessionProfiler.LoginTime, new Date(System.currentTimeMillis())); // Login and initialize if (this.eventManager != null) { this.eventManager.preLogin(this); } //setup the external transaction controller getServerPlatform().initializeExternalTransactionController(); log(SessionLog.INFO, null, "topLink_version", DatasourceLogin.getVersion()); if (getServerPlatform().getServerNameAndVersion() != null && !getServerPlatform().getServerNameAndVersion().equals(ServerPlatformBase.DEFAULT_SERVER_NAME_AND_VERSION)) { log(SessionLog.INFO, null, "application_server_name_and_version", getServerPlatform().getServerNameAndVersion()); } this.isLoggingOff = (getLogLevel() == SessionLog.OFF); }
result = getProfiler().profileExecutionOfQuery(query, row, this); } else { result = internalExecuteQuery(query, row);
/** * PUBLIC: * Set the profiler for the session. * This allows for performance operations to be profiled. */ @Override public void setProfiler(SessionProfiler profiler) { this.profiler = profiler; if (profiler != null) { profiler.setSession(this); setIsInProfile(getProfiler().getProfileWeight() != SessionProfiler.NONE); // Clear cached flag that bypasses the profiler check. getIdentityMapAccessorInstance().getIdentityMapManager().checkIsCacheAccessPreCheckRequired(); } else { setIsInProfile(false); } }
/** * Return the DMS sensor weight * @return */ public int getProfileWeight() { if (getSession().isInProfile()) { return getSession().getProfiler().getProfileWeight(); } else { return 0; } }
/** * This method is used to change DMS sensor weight. */ public void setProfileWeight(int weight) { if (getSession().isInProfile()) { getSession().getProfiler().setProfileWeight(weight); } }
/** * INTERNAL: * Updates the value of SessionProfiler state */ public void updateProfile(String operationName, Object value) { if (this.isInProfile) { getProfiler().update(operationName, value); } }
result = getProfiler().profileExecutionOfQuery(query, row, this); } else { result = internalExecuteQuery(query, row);
/** * PUBLIC: * Set the profiler for the session. * This allows for performance operations to be profiled. */ public void setProfiler(SessionProfiler profiler) { this.profiler = profiler; if (profiler != null) { profiler.setSession(this); setIsInProfile(getProfiler().getProfileWeight() != SessionProfiler.NONE); // Clear cached flag that bypasses the profiler check. getIdentityMapAccessorInstance().getIdentityMapManager().clearCacheAccessPreCheck(); } else { setIsInProfile(false); } }
/** * INTERNAL: * End the operation timing. */ @Override public void endOperationProfile(String operationName) { if (this.isInProfile) { getProfiler().endOperationProfile(operationName); } }
/** * INTERNAL: * Start the operation timing. */ public void startOperationProfile(String operationName, DatabaseQuery query, int weight) { if (this.isInProfile) { getProfiler().startOperationProfile(operationName, query, weight); } }
/** * Return the DMS sensor weight * @return */ public int getProfileWeight() { if (getSession().isInProfile()) { return getSession().getProfiler().getProfileWeight(); } else { return 0; } }
/** * INTERNAL: * Updates the count of SessionProfiler event */ public void incrementProfile(String operationName, DatabaseQuery query) { if (this.isInProfile) { getProfiler().occurred(operationName, query, this); } }