com.hazelcast.client.proxy
Class ClientSemaphoreProxy
java.lang.Object
com.hazelcast.client.spi.ClientProxy
com.hazelcast.client.proxy.ClientSemaphoreProxy
- All Implemented Interfaces:
- DistributedObject, ISemaphore
public class ClientSemaphoreProxy
- extends ClientProxy
- implements ISemaphore
| Methods inherited from class com.hazelcast.client.spi.ClientProxy |
destroy, equals, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeInterruptibly, listen, listen, onDestroy, onInitialize, onShutdown, setContext, stopListening, throwExceptionIfNull, toData, toObject |
ClientSemaphoreProxy
public ClientSemaphoreProxy(String serviceName,
String objectId)
init
public boolean init(int permits)
- Specified by:
init in interface ISemaphore
acquire
public void acquire()
throws InterruptedException
- Specified by:
acquire in interface ISemaphore
- Throws:
InterruptedException
acquire
public void acquire(int permits)
throws InterruptedException
- Specified by:
acquire in interface ISemaphore
- Throws:
InterruptedException
availablePermits
public int availablePermits()
- Specified by:
availablePermits in interface ISemaphore
drainPermits
public int drainPermits()
- Specified by:
drainPermits in interface ISemaphore
reducePermits
public void reducePermits(int reduction)
- Specified by:
reducePermits in interface ISemaphore
release
public void release()
- Specified by:
release in interface ISemaphore
release
public void release(int permits)
- Specified by:
release in interface ISemaphore
tryAcquire
public boolean tryAcquire()
- Specified by:
tryAcquire in interface ISemaphore
tryAcquire
public boolean tryAcquire(int permits)
- Specified by:
tryAcquire in interface ISemaphore
tryAcquire
public boolean tryAcquire(long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
tryAcquire in interface ISemaphore
- Throws:
InterruptedException
tryAcquire
public boolean tryAcquire(int permits,
long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
tryAcquire in interface ISemaphore
- Throws:
InterruptedException
invoke
protected <T> T invoke(ClientRequest req)
- Overrides:
invoke in class ClientProxy
getKey
public Data getKey()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.