ISemaphore MethodsHazelcast .Net Client Class Library

The ISemaphore type exposes the following members.

Methods

  NameDescription
Public methodAcquire
Acquires a permit, if one is available and returns immediately, reducing the number of available permits by one.
Public methodAcquire(Int32)
Acquires the given number of permits, if they are available, and returns immediately, reducing the number of available permits by the given amount.
Public methodAvailablePermits
Returns the current number of permits currently available in this semaphore.
Public methodDestroy
Destroys this object cluster-wide.
(Inherited from IDistributedObject.)
Public methodDrainPermits
Acquires and returns all permits that are immediately available.
Public methodGetName
Returns the unique name for this IDistributedObject.
(Inherited from IDistributedObject.)
Public methodGetPartitionKey
Returns the key of partition this IDistributedObject is assigned to.
(Inherited from IDistributedObject.)
Public methodGetServiceName
Returns the service name for this object.
(Inherited from IDistributedObject.)
Public methodInit
Try to initialize this ISemaphore instance with given permit count
Public methodReducePermits
Shrinks the number of available permits by the indicated reduction.
Public methodRelease
Releases a permit, increasing the number of available permits by one.
Public methodRelease(Int32)
Releases the given number of permits, increasing the number of available permits by that amount.
Public methodTryAcquire
Acquires a permit, if one is available and returns immediately, with the value true, reducing the number of available permits by one.
Public methodTryAcquire(Int32)
Acquires the given number of permits, if they are available, and returns immediately, with the value true, reducing the number of available permits by the given amount.
Public methodTryAcquire(Int64, TimeUnit)
Acquires a permit from this semaphore, if one becomes available within the given waiting time and the current thread has not been interrupted.
Public methodTryAcquire(Int32, Int64, TimeUnit)
Acquires the given number of permits, if they are available and returns immediately, with the value true , reducing the number of available permits by the given amount.
Top
See Also

Reference