com.wm.app.tn.db
Class DBLock

java.lang.Object
  extended by com.wm.app.tn.db.DBLock

public class DBLock
extends java.lang.Object


Constructor Summary
DBLock(java.lang.String lockId, long expired, java.lang.String lockName)
           
 
Method Summary
 void aquire()
          Aquire the lock.
 void release()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBLock

public DBLock(java.lang.String lockId,
              long expired,
              java.lang.String lockName)
Method Detail

aquire

public void aquire()
            throws java.sql.SQLException
Aquire the lock. It's blocked until the lock is available

Throws:
java.sql.SQLException

release

public void release()
             throws java.sql.SQLException
Throws:
java.sql.SQLException