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."); }
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."); }
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."); }
public void TestSmall() { TxnGenMain main = new TxnGenMain(1000, 3000, "TransactionExample", false); main.Run(); }
public void TestTiny() { TxnGenMain main = new TxnGenMain(20, 200, "TransactionExample", false); main.Run(); }