/** <inheritdoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.BeforeNodeStop && _ignite != null) { ((Ignite)_ignite).BeforeNodeStop(); } }
/// <summary> /// Ctor. /// </summary> /// <param name="name">is the name of the named window</param> /// <param name="processor">instance for processing the named window contents</param> /// <param name="eventType">the type of event</param> /// <param name="paramList">event parameters</param> protected internal NamedWindowLifecycleEvent(String name, NamedWindowProcessor processor, LifecycleEventType eventType, params Object[] paramList) { _name = name; _processor = processor; _eventType = eventType; _paramList = paramList; }
/// <summary>Ctor. </summary> /// <param name="statement">the statement</param> /// <param name="eventType">the type if event</param> /// <param name="parameters">event parameters</param> public StatementLifecycleEvent(EPStatement statement, LifecycleEventType eventType, params Object[] parameters) { Statement = statement; EventType = eventType; Parameters = parameters; }
/** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.AfterNodeStart) // This event cannot be propagated right away because at this point we // do not have Ignite instance yet. So just schedule it. _startEvt = true; else _target.OnLifecycleEvent(evt); }
/** <inheritdoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.AfterNodeStop) { _isStopping = true; Stop(); } }
private void CheckExitCondition(InternalState internalState, LifecycleEventType eventType) { foreach (IExitCondition exitCondition in exitConditions) { if (exitCondition.CheckExitCondition(this, internalState, eventType)) { throw new ExitConditionException(exitCondition, internalState, eventType); } } }
/** <inheritdoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { if (evt != LifecycleEventType.AfterNodeStart && evt != LifecycleEventType.BeforeNodeStop) { return; } _ignite.GetCompute() .ExecuteJavaTask <object>(SetUseTypedArrayTask, evt == LifecycleEventType.AfterNodeStart); }
#pragma warning restore 649 /** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { Console.WriteLine(); Console.WriteLine(">>> Ignite lifecycle event occurred: " + evt); Console.WriteLine(">>> Ignite name: " + (_ignite != null ? _ignite.Name : "not available")); if (evt == LifecycleEventType.AfterNodeStart) Started = true; else if (evt == LifecycleEventType.AfterNodeStop) Started = false; }
public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.AfterNodeStart) { Started = true; } else if (evt == LifecycleEventType.AfterNodeStop) { Started = false; } }
/** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { if (evt == LifecycleEventType.AfterNodeStart) { // This event cannot be propagated right away because at this point we // do not have Ignite instance yet. So just schedule it. _startEvt = true; } else { _target.OnLifecycleEvent(evt); } }
private ExitConditionException NotifyLifecycleEvent(LifecycleEventType eventType) { ExitConditionException pendingInterruption = null; try { switch (eventType) { case LifecycleEventType.HalfTState: if (HalfTState != null) { HalfTState(new InternalState(this), eventType); } break; case LifecycleEventType.InstructionEnd: if (InstructionEnd != null) { InstructionEnd(new InternalState(this), eventType); } break; case LifecycleEventType.InstructionStart: if (InstructionStart != null) { InstructionStart(new InternalState(this), eventType); } break; case LifecycleEventType.MachineCycleEnd: if (MachineCycleEnd != null) { MachineCycleEnd(new InternalState(this), eventType); } break; case LifecycleEventType.MachineCycleStart: if (MachineCycleStart != null) { MachineCycleStart(new InternalState(this), eventType); } break; } } catch (ExitConditionException e) { pendingInterruption = e; } return(pendingInterruption); }
#pragma warning restore 649 /** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evt) { Console.WriteLine(); Console.WriteLine(">>> Ignite lifecycle event occurred: " + evt); Console.WriteLine(">>> Ignite name: " + (_ignite != null ? _ignite.Name : "not available")); if (evt == LifecycleEventType.AfterNodeStart) { Started = true; } else if (evt == LifecycleEventType.AfterNodeStop) { Started = false; } }
private IEnumerator RunAssertInternal(LifecycleEventType lifecycleEventType, Action <GameObject> callback = null) { yield return (RunAssert( "LifecycleEvent", AssertLifecycleEvent, () => { CurrentLifecycleEventType = lifecycleEventType; var go = SceneManager .GetSceneByName("LifecycleEvent") .GetRootGameObjects() .First(x => x.name == lifecycleEventType.ToString()); Assert.NotNull(go); go.SetActive(true); callback?.Invoke(go); }, 0.5 )); }
private ExitConditionException NotifyLifecycleEvent(LifecycleEventType eventType) { ExitConditionException pendingInterruption = null; try { switch (eventType) { case LifecycleEventType.ClockCycle: if (ClockCycle != null) { ClockCycle(this, new InternalState(this), eventType); } break; } } catch (ExitConditionException e) { pendingInterruption = e; } return(pendingInterruption); }
/** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evtType) { if (LifecycleTest.ThrowErr) { throw new Exception("Lifecycle exception."); } Event evt = new Event { Grid1 = Grid1, Grid2 = Grid2, Prop1 = Property1, Prop2 = Property2 }; switch (evtType) { case LifecycleEventType.BeforeNodeStart: LifecycleTest.BeforeStartEvts.Add(evt); break; case LifecycleEventType.AfterNodeStart: LifecycleTest.AfterStartEvts.Add(evt); break; case LifecycleEventType.BeforeNodeStop: LifecycleTest.BeforeStopEvts.Add(evt); break; case LifecycleEventType.AfterNodeStop: LifecycleTest.AfterStopEvts.Add(evt); break; } }
private ExitConditionException NotifyLifecycleEvent(LifecycleEventType eventType) { ExitConditionException pendingInterruption = null; try { switch (eventType) { case LifecycleEventType.ClockCycle: if (ClockCycle != null) { ClockCycle(this, new InternalState(this), eventType); } break; } } catch (ExitConditionException e) { pendingInterruption = e; } return pendingInterruption; }
/// <summary> /// This method is called when lifecycle event occurs. /// </summary> /// <param name="evt">Lifecycle event.</param> public void OnLifecycleEvent(LifecycleEventType evt) { // No-op. }
public void OnLifecycleEvent(LifecycleEventType evt) { throw new ArithmeticException("Failure in bean"); }
public ExitConditionException(IExitCondition exitCondition, InternalState internalState, LifecycleEventType eventType) { this.ExitCondition = exitCondition; this.InternalState = internalState; this.EventType = eventType; }
public static LifecycleEventData Create(LifecycleEventType lifecycleEventType) => new LifecycleEventData(lifecycleEventType);
/** <inheritDoc /> */ public void OnLifecycleEvent(LifecycleEventType evtType) { if (LifecycleTest.ThrowErr) throw new Exception("Lifecycle exception."); Event evt = new Event(); evt.Grid1 = Grid1; evt.Grid2 = Grid2; evt.Prop1 = Property1; evt.Prop2 = Property2; switch (evtType) { case LifecycleEventType.BeforeNodeStart: LifecycleTest.BeforeStartEvts.Add(evt); break; case LifecycleEventType.AfterNodeStart: LifecycleTest.AfterStartEvts.Add(evt); break; case LifecycleEventType.BeforeNodeStop: LifecycleTest.BeforeStopEvts.Add(evt); break; case LifecycleEventType.AfterNodeStop: LifecycleTest.AfterStopEvts.Add(evt); break; } }
private LifecycleEventData(LifecycleEventType eventType) { EventType = eventType; }