ICountDownLatch is a backed-up distributed alternative to the . ICountDownLatch is a cluster-wide synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes. There are a few differences compared to the:
- the ICountDownLatch count can be re-set using TrySetCount(int) after a countdown has finished but not during an active count. This allows the same latch instance to be reused.
- there is no await() method to do an unbound wait since this is undesirable in a distributed application: it can happen that for example a cluster is split or that the master and replica's all die. So in most cases it is best to configure an explicit timeout so have the ability to deal with these situations.
Assembly: Hazelcast.Net (in Hazelcast.Net.dll) Version: 18.104.22.168
Thetype exposes the following members.
Causes the current thread to wait until the latch has counted down to zero, an exception is thrown, or the specified waiting time elapses.
Decrements the count of the latch, releasing all waiting threads if the count reaches zero.
Destroys this object cluster-wide.(Inherited from IDistributedObject.)
Returns the current count.
Returns the unique name for this IDistributedObject.(Inherited from IDistributedObject.)
Returns the key of partition this IDistributedObject is assigned to.(Inherited from IDistributedObject.)
Returns the service name for this object.(Inherited from IDistributedObject.)
Sets the count to the given value if the current count is zero.