C# Класс Disruptor.PhasedBackoffWaitStrategy

Phased wait strategy for waiting EventProcessor s on a barrier.

This strategy can be used when throughput and low-latency are not as important as CPU resource. Spins, then yields, then blocks on the configured BlockingStrategy.

Наследование: IWaitStrategy
Показать файл Открыть проект

Открытые методы

Метод Описание
PhasedBackoffWaitStrategy ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout, IWaitStrategy fallbackStrategy ) : System
SignalAllWhenBlocking ( ) : void

IWaitStrategy.SignalAllWhenBlocking

WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long

IWaitStrategy.WaitFor

WithLock ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout ) : PhasedBackoffWaitStrategy

Block with wait/notifyAll semantics

WithSleep ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout ) : PhasedBackoffWaitStrategy

Block by sleeping in a loop

Приватные методы

Метод Описание
GetSystemTimePreciseAsFileTime ( long &filetime ) : void
GetSystemTimeTicks ( ) : long
PhasedBackoffWaitStrategy ( ) : System

Описание методов

PhasedBackoffWaitStrategy() публичный Метод

public PhasedBackoffWaitStrategy ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout, IWaitStrategy fallbackStrategy ) : System
spinTimeout System.TimeSpan
yieldTimeout System.TimeSpan
fallbackStrategy IWaitStrategy
Результат System

SignalAllWhenBlocking() публичный Метод

IWaitStrategy.SignalAllWhenBlocking
public SignalAllWhenBlocking ( ) : void
Результат void

WaitFor() публичный Метод

IWaitStrategy.WaitFor
public WaitFor ( long sequence, Sequence cursor, ISequence dependentSequence, ISequenceBarrier barrier ) : long
sequence long
cursor Sequence
dependentSequence ISequence
barrier ISequenceBarrier
Результат long

WithLock() публичный статический Метод

Block with wait/notifyAll semantics
public static WithLock ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout ) : PhasedBackoffWaitStrategy
spinTimeout System.TimeSpan
yieldTimeout System.TimeSpan
Результат PhasedBackoffWaitStrategy

WithSleep() публичный статический Метод

Block by sleeping in a loop
public static WithSleep ( System.TimeSpan spinTimeout, System.TimeSpan yieldTimeout ) : PhasedBackoffWaitStrategy
spinTimeout System.TimeSpan
yieldTimeout System.TimeSpan
Результат PhasedBackoffWaitStrategy