com.hazelcast.client.proxy
Class ClientLockProxy

java.lang.Object
  extended by com.hazelcast.client.spi.ClientProxy
      extended by com.hazelcast.client.proxy.ClientLockProxy
All Implemented Interfaces:
DistributedObject, ILock, Lock

public class ClientLockProxy
extends ClientProxy
implements ILock


Constructor Summary
ClientLockProxy(String serviceName, String objectId)
           
 
Method Summary
 void forceUnlock()
           
 Object getKey()
          Deprecated. 
 int getLockCount()
           
 long getRemainingLeaseTime()
           
protected
<T> T
invoke(ClientRequest req)
           
 boolean isLocked()
           
 boolean isLockedByCurrentThread()
           
 void lock()
           
 void lock(long leaseTime, TimeUnit timeUnit)
           
 void lockInterruptibly()
           
 Condition newCondition()
           
 ICondition newCondition(String name)
           
 String toString()
           
 boolean tryLock()
           
 boolean tryLock(long time, TimeUnit unit)
           
 void unlock()
           
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.DistributedObject
destroy, getId, getName, getPartitionKey, getServiceName
 

Constructor Detail

ClientLockProxy

public ClientLockProxy(String serviceName,
                       String objectId)
Method Detail

getKey

@Deprecated
public Object getKey()
Deprecated. 

Specified by:
getKey in interface ILock

isLocked

public boolean isLocked()
Specified by:
isLocked in interface ILock

isLockedByCurrentThread

public boolean isLockedByCurrentThread()
Specified by:
isLockedByCurrentThread in interface ILock

getLockCount

public int getLockCount()
Specified by:
getLockCount in interface ILock

getRemainingLeaseTime

public long getRemainingLeaseTime()
Specified by:
getRemainingLeaseTime in interface ILock

lock

public void lock(long leaseTime,
                 TimeUnit timeUnit)
Specified by:
lock in interface ILock

forceUnlock

public void forceUnlock()
Specified by:
forceUnlock in interface ILock

newCondition

public ICondition newCondition(String name)
Specified by:
newCondition in interface ILock

lock

public void lock()
Specified by:
lock in interface ILock
Specified by:
lock in interface Lock

lockInterruptibly

public void lockInterruptibly()
                       throws InterruptedException
Specified by:
lockInterruptibly in interface Lock
Throws:
InterruptedException

tryLock

public boolean tryLock()
Specified by:
tryLock in interface ILock
Specified by:
tryLock in interface Lock

tryLock

public boolean tryLock(long time,
                       TimeUnit unit)
                throws InterruptedException
Specified by:
tryLock in interface ILock
Specified by:
tryLock in interface Lock
Throws:
InterruptedException

unlock

public void unlock()
Specified by:
unlock in interface ILock
Specified by:
unlock in interface Lock

newCondition

public Condition newCondition()
Specified by:
newCondition in interface ILock
Specified by:
newCondition in interface Lock

invoke

protected <T> T invoke(ClientRequest req)
Overrides:
invoke in class ClientProxy

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.