public class ClientSemaphoreProxy extends ClientProxy implements ISemaphore
| Constructor and Description |
|---|
ClientSemaphoreProxy(String serviceName,
String objectId) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire() |
void |
acquire(int permits) |
int |
availablePermits() |
int |
drainPermits() |
Data |
getKey() |
boolean |
init(int permits) |
protected <T> T |
invoke(ClientRequest req) |
void |
reducePermits(int reduction) |
void |
release() |
void |
release(int permits) |
String |
toString() |
boolean |
tryAcquire() |
boolean |
tryAcquire(int permits) |
boolean |
tryAcquire(int permits,
long timeout,
TimeUnit unit) |
boolean |
tryAcquire(long timeout,
TimeUnit unit) |
deregisterListener, destroy, equals, getClient, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeInterruptibly, invokeOnPartition, onDestroy, onInitialize, onShutdown, registerListener, setContext, throwExceptionIfNull, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNamedestroy, getPartitionKey, getServiceNamepublic boolean init(int permits)
init in interface ISemaphorepublic void acquire()
throws InterruptedException
acquire in interface ISemaphoreInterruptedExceptionpublic void acquire(int permits)
throws InterruptedException
acquire in interface ISemaphoreInterruptedExceptionpublic int availablePermits()
availablePermits in interface ISemaphorepublic int drainPermits()
drainPermits in interface ISemaphorepublic void reducePermits(int reduction)
reducePermits in interface ISemaphorepublic void release()
release in interface ISemaphorepublic void release(int permits)
release in interface ISemaphorepublic boolean tryAcquire()
tryAcquire in interface ISemaphorepublic boolean tryAcquire(int permits)
tryAcquire in interface ISemaphorepublic boolean tryAcquire(long timeout,
TimeUnit unit)
throws InterruptedException
tryAcquire in interface ISemaphoreInterruptedExceptionpublic boolean tryAcquire(int permits,
long timeout,
TimeUnit unit)
throws InterruptedException
tryAcquire in interface ISemaphoreInterruptedExceptionprotected <T> T invoke(ClientRequest req)
invoke in class ClientProxypublic Data getKey()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.