コード例 #1
0
        public void Dispose()
        {
            if (_main != null)
            {
                EPServiceProviderManager.GetProvider(_engineURI).EPAdministrator.DestroyAllStatements();
            }

            try {
                _simulationThread.Interrupt();
                _simulationThread.Join();
            }
            catch (ThreadInterruptedException e) {
                Log.Info("Interrupted", e);
            }
            _main = null;
            Log.Info("Transaction-example stopped.");
        }
コード例 #2
0
        public void PostInitialize()
        {
            Log.Info("Starting Transaction-example for engine URI '" + _engineURI + "'.");

            try {
                _main                          = new TxnGenMain(20, 200, _engineURI, true);
                _simulationThread              = new Thread(() => _main.Run());
                _simulationThread.Name         = GetType().FullName + "-simulator";
                _simulationThread.IsBackground = true;
                _simulationThread.Start();
            }
            catch (Exception e) {
                Log.Error("Error starting Transaction example: " + e.Message);
            }

            Log.Info("Transaction-example started.");
        }
コード例 #3
0
        public void Dispose()
        {
            if (_main != null)
            {
                EPRuntimeProvider.GetRuntime(_engineURI)
                .DeploymentService
                .UndeployAll();
            }

            try {
                _simulationThread.Interrupt();
                _simulationThread.Join();
            }
            catch (ThreadInterruptedException e) {
                Log.Info("Interrupted", e);
            }
            _main = null;
            Log.Info("Transaction-example stopped.");
        }
コード例 #4
0
ファイル: TestTxnSimMain.cs プロジェクト: qinfengzhu/nesper
        public void TestSmall()
        {
            TxnGenMain main = new TxnGenMain(1000, 3000, "TransactionExample", false);

            main.Run();
        }
コード例 #5
0
ファイル: TestTxnSimMain.cs プロジェクト: qinfengzhu/nesper
        public void TestTiny()
        {
            TxnGenMain main = new TxnGenMain(20, 200, "TransactionExample", false);

            main.Run();
        }