org.egothor.lock
Class LockRequest

java.lang.Object
  extended by org.egothor.lock.LockRequest

public class LockRequest
extends java.lang.Object

Single request - action upon a lock.

Author:
Jakub Podhorny

Constructor Summary
LockRequest(LockType lockType, LockAction lockAction, long lockId, java.lang.String location, long periodOfTime, long indexConstPeriodOfTime, int timeOut)
           
 
Method Summary
 long getIndexConstPeriodOfTime()
           
 java.lang.String getLocation()
           
 LockAction getLockAction()
           
 long getLockId()
           
 LockType getLockType()
           
 long getPeriodOfTime()
           
 int getTimeOut()
           
static LockRequest resolveRequest(java.nio.ByteBuffer buffer)
           
 byte[] toByteArray()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockRequest

public LockRequest(LockType lockType,
                   LockAction lockAction,
                   long lockId,
                   java.lang.String location,
                   long periodOfTime,
                   long indexConstPeriodOfTime,
                   int timeOut)
Parameters:
lockType -
lockAction -
lockId -
location -
periodOfTime -
indexConstPeriodOfTime -
timeOut -
Method Detail

toByteArray

public byte[] toByteArray()
Returns:

resolveRequest

public static LockRequest resolveRequest(java.nio.ByteBuffer buffer)
Parameters:
buffer -
Returns:

getLockType

public LockType getLockType()

getLockAction

public LockAction getLockAction()

getLockId

public long getLockId()

getLocation

public java.lang.String getLocation()

getPeriodOfTime

public long getPeriodOfTime()

getIndexConstPeriodOfTime

public long getIndexConstPeriodOfTime()

getTimeOut

public int getTimeOut()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object