public class TracingSemaphore extends Object implements com.hazelcast.core.ISemaphore
| Constructor and Description |
|---|
TracingSemaphore(com.hazelcast.core.ISemaphore semaphore,
boolean traceWithActiveSpanOnly) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire() |
void |
acquire(int permits) |
int |
availablePermits() |
void |
destroy() |
int |
drainPermits() |
String |
getName() |
String |
getPartitionKey() |
String |
getServiceName() |
void |
increasePermits(int increase) |
boolean |
init(int permits) |
void |
reducePermits(int reduction) |
void |
release() |
void |
release(int permits) |
boolean |
tryAcquire() |
boolean |
tryAcquire(int permits) |
boolean |
tryAcquire(int permits,
long timeout,
TimeUnit unit) |
boolean |
tryAcquire(long timeout,
TimeUnit unit) |
public TracingSemaphore(com.hazelcast.core.ISemaphore semaphore,
boolean traceWithActiveSpanOnly)
public String getName()
getName in interface com.hazelcast.core.DistributedObjectgetName in interface com.hazelcast.core.ISemaphorepublic boolean init(int permits)
init in interface com.hazelcast.core.ISemaphorepublic void acquire()
throws InterruptedException
acquire in interface com.hazelcast.core.ISemaphoreInterruptedExceptionpublic void acquire(int permits)
throws InterruptedException
acquire in interface com.hazelcast.core.ISemaphoreInterruptedExceptionpublic int availablePermits()
availablePermits in interface com.hazelcast.core.ISemaphorepublic int drainPermits()
drainPermits in interface com.hazelcast.core.ISemaphorepublic void reducePermits(int reduction)
reducePermits in interface com.hazelcast.core.ISemaphorepublic void increasePermits(int increase)
increasePermits in interface com.hazelcast.core.ISemaphorepublic void release()
release in interface com.hazelcast.core.ISemaphorepublic void release(int permits)
release in interface com.hazelcast.core.ISemaphorepublic boolean tryAcquire()
tryAcquire in interface com.hazelcast.core.ISemaphorepublic boolean tryAcquire(int permits)
tryAcquire in interface com.hazelcast.core.ISemaphorepublic boolean tryAcquire(long timeout,
TimeUnit unit)
throws InterruptedException
tryAcquire in interface com.hazelcast.core.ISemaphoreInterruptedExceptionpublic boolean tryAcquire(int permits,
long timeout,
TimeUnit unit)
throws InterruptedException
tryAcquire in interface com.hazelcast.core.ISemaphoreInterruptedExceptionpublic String getPartitionKey()
getPartitionKey in interface com.hazelcast.core.DistributedObjectpublic String getServiceName()
getServiceName in interface com.hazelcast.core.DistributedObjectpublic void destroy()
destroy in interface com.hazelcast.core.DistributedObjectCopyright © 2018-2019–2019. All rights reserved.