com.hazelcast.client
Class SemaphoreClientProxy

java.lang.Object
  extended by com.hazelcast.client.SemaphoreClientProxy
All Implemented Interfaces:
Instance, ISemaphore

public class SemaphoreClientProxy
extends Object
implements ISemaphore


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hazelcast.core.Instance
Instance.InstanceType
 
Constructor Summary
SemaphoreClientProxy(HazelcastClient hazelcastClient, String name)
           
 
Method Summary
 void acquire()
           
 void acquire(int permits)
           
 Future acquireAsync()
           
 Future acquireAsync(int permits)
           
 void acquireAttach()
           
 void acquireAttach(int permits)
           
 Future acquireAttachAsync()
           
 Future acquireAttachAsync(int permits)
           
 void attach()
           
 void attach(int permits)
           
 int attachedPermits()
           
 int availablePermits()
           
 void destroy()
           
 void detach()
           
 void detach(int permits)
           
 int drainPermits()
           
 Object getId()
           
 Instance.InstanceType getInstanceType()
           
 LocalSemaphoreStats getLocalSemaphoreStats()
           
 String getName()
           
 void reducePermits(int permits)
           
 void release()
           
 void release(int permits)
           
 void releaseDetach()
           
 void releaseDetach(int permits)
           
 boolean tryAcquire()
           
 boolean tryAcquire(int permits)
           
 boolean tryAcquire(int permits, long timeout, TimeUnit unit)
           
 boolean tryAcquire(long timeout, TimeUnit unit)
           
 boolean tryAcquireAttach()
           
 boolean tryAcquireAttach(int permits)
           
 boolean tryAcquireAttach(int permits, long timeout, TimeUnit unit)
           
 boolean tryAcquireAttach(long timeout, TimeUnit unit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemaphoreClientProxy

public SemaphoreClientProxy(HazelcastClient hazelcastClient,
                            String name)
Method Detail

acquire

public void acquire()
             throws InstanceDestroyedException,
                    InterruptedException
Specified by:
acquire in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

acquire

public void acquire(int permits)
             throws InstanceDestroyedException,
                    InterruptedException
Specified by:
acquire in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

acquireAsync

public Future acquireAsync()
Specified by:
acquireAsync in interface ISemaphore

acquireAsync

public Future acquireAsync(int permits)
Specified by:
acquireAsync in interface ISemaphore

acquireAttach

public void acquireAttach()
                   throws InstanceDestroyedException,
                          InterruptedException
Specified by:
acquireAttach in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

acquireAttach

public void acquireAttach(int permits)
                   throws InstanceDestroyedException,
                          InterruptedException
Specified by:
acquireAttach in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

acquireAttachAsync

public Future acquireAttachAsync()
Specified by:
acquireAttachAsync in interface ISemaphore

acquireAttachAsync

public Future acquireAttachAsync(int permits)
Specified by:
acquireAttachAsync in interface ISemaphore

attach

public void attach()
Specified by:
attach in interface ISemaphore

attach

public void attach(int permits)
Specified by:
attach in interface ISemaphore

attachedPermits

public int attachedPermits()
Specified by:
attachedPermits in interface ISemaphore

availablePermits

public int availablePermits()
Specified by:
availablePermits in interface ISemaphore

detach

public void detach()
Specified by:
detach in interface ISemaphore

detach

public void detach(int permits)
Specified by:
detach in interface ISemaphore

drainPermits

public int drainPermits()
Specified by:
drainPermits in interface ISemaphore

reducePermits

public void reducePermits(int permits)
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

releaseDetach

public void releaseDetach()
Specified by:
releaseDetach in interface ISemaphore

releaseDetach

public void releaseDetach(int permits)
Specified by:
releaseDetach 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 InstanceDestroyedException,
                          InterruptedException
Specified by:
tryAcquire in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

tryAcquire

public boolean tryAcquire(int permits,
                          long timeout,
                          TimeUnit unit)
                   throws InstanceDestroyedException,
                          InterruptedException
Specified by:
tryAcquire in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

tryAcquireAttach

public boolean tryAcquireAttach()
Specified by:
tryAcquireAttach in interface ISemaphore

tryAcquireAttach

public boolean tryAcquireAttach(int permits)
Specified by:
tryAcquireAttach in interface ISemaphore

tryAcquireAttach

public boolean tryAcquireAttach(long timeout,
                                TimeUnit unit)
                         throws InstanceDestroyedException,
                                InterruptedException
Specified by:
tryAcquireAttach in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

tryAcquireAttach

public boolean tryAcquireAttach(int permits,
                                long timeout,
                                TimeUnit unit)
                         throws InstanceDestroyedException,
                                InterruptedException
Specified by:
tryAcquireAttach in interface ISemaphore
Throws:
InstanceDestroyedException
InterruptedException

getInstanceType

public Instance.InstanceType getInstanceType()
Specified by:
getInstanceType in interface Instance

destroy

public void destroy()
Specified by:
destroy in interface Instance

getId

public Object getId()
Specified by:
getId in interface Instance

getName

public String getName()
Specified by:
getName in interface ISemaphore

getLocalSemaphoreStats

public LocalSemaphoreStats getLocalSemaphoreStats()
Specified by:
getLocalSemaphoreStats in interface ISemaphore


Copyright © 2012 Hazel Bilisim Ltd.. All Rights Reserved.