public void ResetRunnerPage()
        {
            ExecutorEngine.ResetRunnerExecutionDetails();

            UpdateExecutionStats();
            xruntime.Content = "00:00:00";
            ExecutorEngine.RunnerExecutionWatch.runWatch.Reset();


            OnGingerRunnerEvent(RunnerPageEventArgs.eEventType.ResetRunnerStatus, ExecutorEngine);
        }
Beispiel #2
0
        public AbstractCommandExecutor(ShardingConnection shardingConnection)
        {
            this.DatabaseType = shardingConnection.GetRuntimeContext().GetDatabaseType();
            this.Connection   = shardingConnection;
            // int maxConnectionsSizePerQuery = connection.GetRuntimeContext().GetProperties().<Integer>getValue(ConfigurationPropertyKey.MAX_CONNECTIONS_SIZE_PER_QUERY);
            int            maxConnectionsSizePerQuery = 1;
            ExecutorEngine executorEngine             = Connection.GetRuntimeContext().GetExecutorEngine();

            SqlExecutePrepareTemplate = new SqlExecutePrepareTemplate(maxConnectionsSizePerQuery);
            SqlExecuteTemplate        = new SqlExecuteTemplate(executorEngine, Connection.IsHoldTransaction());
        }
Beispiel #3
0
 protected AbstractRuntimeContext(T rule, IDictionary <string, object> props, IDatabaseType databaseType)
 {
     this.rule = rule;
     // properties = new ConfigurationProperties(null == props ? new Properties() : props);
     properties        = new ConfigurationProperties();
     this.databaseType = databaseType;
     executorEngine    = ExecutorEngine.Instance;
     //更加数据库类型获取对应的解析器
     sqlParserEngine = SqlParserEngineFactory.GetSqlParserEngine(DatabaseTypes.GetTrunkDatabaseTypeName(databaseType));
     // ConfigurationLogger.log(rule.getRuleConfiguration());
     // ConfigurationLogger.log(props);
 }
 /**
  * Execute.
  *
  * @param inputGroups input groups
  * @param firstCallback first SQL execute callback
  * @param callback SQL execute callback
  * @param <T> class type of return value
  * @return execute result
  * @throws SQLException SQL exception
  */
 public List <R> Execute <R>(ICollection <InputGroup <CommandExecuteUnit> > inputGroups,
                             SqlExecuteCallback <R> firstCallback, SqlExecuteCallback <R> callback)
 {
     try
     {
         return(ExecutorEngine.Execute(inputGroups, firstCallback, callback, Serial));
     }
     catch (Exception ex) {
         ExecutorExceptionHandler.HandleException(ex);
         return(new List <R>());
     }
 }
 public SqlExecuteTemplate(ExecutorEngine executorEngine, bool serial)
 {
     ExecutorEngine = executorEngine;
     Serial         = serial;
 }