Package com.alachisoft.ncache.client
Class LockHandle
- java.lang.Object
-
- com.alachisoft.ncache.client.LockHandle
-
public final class LockHandle extends java.lang.Object
An instance of this class is used to lock and unlock the cache items in pessimistic concurrency model.
-
-
Constructor Summary
Constructors Constructor Description LockHandle()
Default constructorLockHandle(LockHandle lockHandle)
Create a new LockHandle populates attributes from specified lockhandle.LockHandle(java.lang.String lockId, java.util.Date lockDate)
Create a new LockHandle
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getLockDate()
Gets the lock date.java.lang.String
getLockId()
Get lock idvoid
setLockDate(java.util.Date lockDate)
Sets lock date.void
setLockId(java.lang.String lockId)
Sets the lock id.
-
-
-
Constructor Detail
-
LockHandle
public LockHandle()
Default constructor
-
LockHandle
public LockHandle(java.lang.String lockId, java.util.Date lockDate)
Create a new LockHandle- Parameters:
lockId
- Unique lock id for lock handle.lockDate
- The time when lock was acquired.
-
LockHandle
public LockHandle(LockHandle lockHandle)
Create a new LockHandle populates attributes from specified lockhandle.- Parameters:
lockHandle
- The lockhandle instance.
-
-
Method Detail
-
getLockId
public java.lang.String getLockId()
Get lock id- Returns:
- Lock id
-
setLockId
public void setLockId(java.lang.String lockId)
Sets the lock id.- Parameters:
lockId
- New lock id.
-
getLockDate
public java.util.Date getLockDate()
Gets the lock date.- Returns:
- Lock date instance.
-
setLockDate
public void setLockDate(java.util.Date lockDate)
Sets lock date.- Parameters:
lockDate
- New lock date.
-
-