SharedTimer Class

Represents a timer class that will group registered timer event callbacks that operate on the same interval in order to optimize thread pool queuing.

Definition

Namespace: Gemstone.Threading
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.128 -- Release Build+d4a9a653be1def5888b9be91bb1825c8655f3529
public sealed class SharedTimer : IDisposable, 
	IProvideStatus
Inheritance
Object    SharedTimer
Implements
IProvideStatus, IDisposable

Remarks

Externally the SharedTimer operations similar to the Timer. Internally the timer pools callbacks with the same Interval into a single timer where each callback is executed on the same thread, per instance of the SharedTimerScheduler.

Any long running callbacks that have a risk of long delays should not use SharedTimer as this will effect the reliability of all of the other SharedTimer instances for a given SharedTimerScheduler.

Properties

AutoReset Gets or sets flag that indicates whether the SharedTimer should raise the Elapsed event only once false or repeatedly true.
Enabled Gets or sets flag that indicates whether the SharedTimer should raise the Elapsed event.
Interval Gets or sets the interval at which to raise the Elapsed event.
Status Gets the current status details about object providing status information.

Methods

Close Stops the timer.
Dispose Stops the timer and prevents reuse of the class.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Start Starts raising the Elapsed event by setting Enabled to true.
Stop Stops raising the Elapsed event by setting Enabled to false.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

Elapsed Occurs when the timer interval elapses.

See Also