C# Class Helios.Concurrency.SingleThreadEventExecutor

A single-threaded IEventExecutor
Inheritance: AbstractScheduledEventExecutor
Afficher le fichier Open project: helios-io/helios Class Usage Examples

Méthodes publiques

Méthode Description
AddShutdownHook ( IRunnable hook ) : void

Add a IRunnable which will be executed on the shutdown of this instance

Execute ( IRunnable task ) : void
GracefulShutdownAsync ( System.TimeSpan quietPeriod, System.TimeSpan timeout ) : Task
IsInEventLoop ( Thread thread ) : bool
RemoveShutdownHook ( IRunnable hook ) : void

Remove a previously added IRunnable as a shutdown hook

SingleThreadEventExecutor ( string threadName, System.TimeSpan breakoutInterval ) : System
Unwrap ( ) : IEventExecutor

Méthodes protégées

Méthode Description
CleanupAndShutdown ( bool success ) : void
ConfirmShutdown ( ) : bool
RunAllTasks ( ) : bool
Wakeup ( bool inEventLoop ) : void

Private Methods

Méthode Description
FetchFromScheduledTaskQueue ( ) : void
Loop ( ) : void
PollTask ( ) : IRunnable
RunAllTasks ( System.TimeSpan breakoutInternval ) : bool
RunShutdownHooks ( ) : bool

Method Details

AddShutdownHook() public méthode

Add a IRunnable which will be executed on the shutdown of this instance
public AddShutdownHook ( IRunnable hook ) : void
hook IRunnable
Résultat void

CleanupAndShutdown() protected méthode

protected CleanupAndShutdown ( bool success ) : void
success bool
Résultat void

ConfirmShutdown() protected méthode

protected ConfirmShutdown ( ) : bool
Résultat bool

Execute() public méthode

public Execute ( IRunnable task ) : void
task IRunnable
Résultat void

GracefulShutdownAsync() public méthode

public GracefulShutdownAsync ( System.TimeSpan quietPeriod, System.TimeSpan timeout ) : Task
quietPeriod System.TimeSpan
timeout System.TimeSpan
Résultat Task

IsInEventLoop() public méthode

public IsInEventLoop ( Thread thread ) : bool
thread Thread
Résultat bool

RemoveShutdownHook() public méthode

Remove a previously added IRunnable as a shutdown hook
public RemoveShutdownHook ( IRunnable hook ) : void
hook IRunnable
Résultat void

RunAllTasks() protected méthode

protected RunAllTasks ( ) : bool
Résultat bool

SingleThreadEventExecutor() public méthode

public SingleThreadEventExecutor ( string threadName, System.TimeSpan breakoutInterval ) : System
threadName string
breakoutInterval System.TimeSpan
Résultat System

Unwrap() public méthode

public Unwrap ( ) : IEventExecutor
Résultat IEventExecutor

Wakeup() protected méthode

protected Wakeup ( bool inEventLoop ) : void
inEventLoop bool
Résultat void