| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Semaphore
An interface for providing thread/resource locking in order to protect resources from being altered by multiple threads at the same time.
| Method Summary | |
|---|---|
|  boolean | isLockOwner(java.sql.Connection conn,
            java.lang.String lockName)Determine whether the calling thread owns a lock on the identified resource. | 
|  boolean | obtainLock(java.sql.Connection conn,
           java.lang.String lockName)Grants a lock on the identified resource to the calling thread (blocking until it is available). | 
|  void | releaseLock(java.sql.Connection conn,
            java.lang.String lockName)Release the lock on the identified resource if it is held by the calling thread. | 
|  boolean | requiresConnection()Whether this Semaphore implementation requires a database connection for its lock management operations. | 
| Method Detail | 
|---|
boolean obtainLock(java.sql.Connection conn,
                   java.lang.String lockName)
                   throws LockException
conn - Database connection used to establish lock.  Can be null if
 requiresConnection()LockException
void releaseLock(java.sql.Connection conn,
                 java.lang.String lockName)
                 throws LockException
conn - Database connection used to establish lock.  Can be null if
 requiresConnection()LockException
boolean isLockOwner(java.sql.Connection conn,
                    java.lang.String lockName)
                    throws LockException
conn - Database connection used to establish lock.  Can be null if
 requiresConnection()LockExceptionboolean requiresConnection()
isLockOwner(Connection, String), 
obtainLock(Connection, String), 
releaseLock(Connection, String)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||