Base class for classes that impelement methods that block until a file or directory is created or deleted.
More...
|
override bool | Condition () |
| This method should be overridden in derived classes. More...
|
|
| WaitCondition () |
| Creates event waiter with properties initialized to default values. More...
|
|
| WaitCondition (int minSleepMs, double maxRelativeLatency) |
| Creates event waiter with properties initialized to specified values (or to default valuse for those parameters that are not specified). More...
|
|
| WaitCondition (int minSleepMs, int maxSleepMs, double maxRelativeLatency, bool sleepFirst) |
| Creates event waiter with properties initialized to specified values (or to default valuse for those parameters that are not specified). More...
|
|
override bool | Condition () |
| Function that returns true if unblocking condition is satisfied, and false otherwise. If the condition delegate is set then the delegate is used to evaluate the condition, otherwise the protected method ConditionFunction() is used. The condition can therefore be adjusted in one of the following ways: More...
|
|
override void | Wait () |
| Blocks until the specified condition gets satisfied. See class description for details. More...
|
|
override string | ToString () |
|
virtual void | CancelOne () |
| Cancels the current waiting for the condition (if one is going on) and unblocks the thread on which waiting was called (possibly with some latency). More...
|
|
virtual void | CancelAll () |
| Cancel the current waiting for the condition on all threads. More...
|
|
|
static void | ExampleBlockCreateRemoveLatence (string filePath) |
| Monitors the specified file and successively blocks until it is created and then until it is removed. This procedure is repeated twice. More...
|
|
static void | ExampleBlockCreateRemoveLatence (string filePath, int numSwitches) |
| Monitors the specified file and successively blocks until it is created and then until it is removed. More...
|
|
static void | ExampleBlockCreateRemoveLatence (string filePath, int numSwitches, bool waitDirectory) |
| Monitors the specified file and successively blocks until it is created and then until it is removed. More...
|
|
static void | TestSpeedBlockCreateRemoveLatence (string filePath) |
| Test of speed of reaction of file/directory creation and removal blocking waits. A specified number of alternate creations and removals are perfomed in a parallel thread, with specified delay between them. In the main thread, blocking waits are performed waiting for creation/removal in an infinite loop, and it is counted how many events are captured and how many are missed. More...
|
|
static void | TestSpeedBlockCreateRemoveLatence (string filePath, int numSwitches, int sleepMs) |
| Test of speed of reaction of file/directory creation and removal blocking waits. A specified number of alternate creations and removals are perfomed in a parallel thread, with specified delay between them. In the main thread, blocking waits are performed waiting for creation/removal in an infinite loop, and it is counted how many events are captured and how many are missed. More...
|
|
static void | TestSpeedBlockCreateRemoveLatence (string filePath, int numSwitches, int sleepMs, bool waitDirectory) |
| Test of speed of reaction of file/directory creation and removal blocking waits. A specified number of alternate creations and removals are perfomed in a parallel thread, with specified delay between them. In the main thread, blocking waits are performed waiting for creation/removal in an infinite loop, and it is counted how many events are captured and how many are missed. More...
|
|
|
string | Path [get, set] |
| Get or set path of the file on which the particular event is waited for. More...
|
|
sealed override
ConditionDelegateBase | ConditionDelegate [protected get, set] |
| Setter of this property must not be used! More...
|
|
virtual ConditionDelegateBase | ConditionDelegate [protected get, set] |
| Contains function that is called to evaluate the unblocking condition. If this delegate is set and Condition() is not overridden then the delegate is used to check whether the unblocking condition is satisfied. More...
|
|
virtual int | MinSleepMs [get, set] |
| Minimal sleeping time, in milliseconds, between successive condition checks. If less than 0 then minimal sleeping time is not specified, so there may be no sleeping. More...
|
|
virtual int | MaxSleepMs [get, set] |
| Maximal sleeping time, in milliseconds, between successive condition checks. If less than 0 then maximal sleeping time is not specified and sleeping interval is not bounded above. If set to 0 then no sleeping will be performed between successive checks (max. sleeping time overrides the minimal sleeping time). More...
|
|
virtual double | MaxRelativeLatency [get, set] |
| Maximal relative latency of waiting procedure. Sleeping time chosen between two successive condition check willl be chosen smaller or equal to total elapsed waiting time multiplied by this number. If less than 0 then maximal relative latency is not specified. If minimal sleeping time is specified then it overrides the sleeping time calculated according to this parameter. More...
|
|
virtual bool | SleepFirst [get, set] |
| If true and if minimal sleeping time is larger than 0, then sleep for minimal sleeping time will be performed before the first check for unblocking condition. More...
|
|
StopWatch1 | Timer [get] |
| Timer that measures the total time elapsed when waiting for fulfillment of unblocking condition. Used to evaluate appropriate sleeping times that will not cause too much latency. More...
|
|
object | Lock [get] |
| This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
|
|
object | InternalLock [get] |
| Used internally for locking access to internal fields. More...
|
|
object | WaitLock [get] |
| Must be used only for locking waiting the Waiting() block (since it is potentially time consuming). More...
|
|
virtual bool | IsWaiting [get, protected set] |
| True if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function. More...
|
|
virtual bool | CancelFlag [get, set] |
| If this flag is set then the current waiting (if one is going on) will be cancelled. More...
|
|
bool | IsWaiting [get] |
| Returns true if waiting for unblocking condition is currently performed, and false otherwise. Setting should only be done within the waiting function. More...
|
|
object | Lock [get] |
|
string | Path [get, set] |
| Path of the file or directory on which the particular event is waited for. Can be specified as relative path, but is internally stored as fully qualified path. More...
|
|
Base class for classes that impelement methods that block until a file or directory is created or deleted.
$A Igor Jun10;