Home » apache-tomcat-6.0.26-src » org.apache » catalina » session » [javadoc | source]
org.apache.catalina.session
public class: SessionLock [javadoc | source]
java.lang.Object
   org.apache.catalina.session.SessionLock
Constructor:
 public SessionLock() 
Method from org.apache.catalina.session.SessionLock Summary:
decrementForegroundRefCount,   getForegroundRefCount,   getLockType,   incrementForegroundRefCount,   isBackgroundLocked,   isForegroundLocked,   isLocked,   lockBackground,   lockForeground,   setForegroundRefCount,   setLockType,   toString,   unlock,   unlockBackground,   unlockForeground,   unlockForegroundCompletely
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.session.SessionLock Detail:
 public  void decrementForegroundRefCount() 
    decrement the foregroundRefCount
 public int getForegroundRefCount() 
    get the foregroundRefCount
 public String getLockType() 
    get the lock type
 public  void incrementForegroundRefCount() 
    increment the foregroundRefCount
 public boolean isBackgroundLocked() 
    return whether lock is background locked
 public boolean isForegroundLocked() 
    return whether lock is foreground locked
 public boolean isLocked() 
    return whether lock is locked (either foreground or background)
 public synchronized boolean lockBackground() 
    if possible, the lock will be background locked if the lock is already foreground locked the method will return false and the lock remains foreground locked (i.e. lock failed) otherwise it will return true (lock succeeded)
 public synchronized boolean lockForeground() 
    if possible, the lock will be foreground locked if it was already foreground locked; it will remain so and the foregroundRefCount will be incremented if the lock is already background locked the method will return false and the lock remains background locked (i.e. lock failed) otherwise it will return true (lock succeeded)
 public  void setForegroundRefCount(int foregroundRefCount) 
    set the foregroundRefCount
 public  void setLockType(String lockType) 
    set the lock type - lockType must be BACKGROUND_LOCK or FOREGROUND_LOCK
 public String toString() 
    returns String representation of the state of the lock
 public  void unlock() 
    unlock the lock if background locked the lock will become fully unlocked if foreground locked the lock will become fully unlocked if foregroundRefCount was 1; otherwise it will decrement the foregroundRefCount and the lock will remain foreground locked
 public  void unlockBackground() 
    unlock the lock for the background locked case the lock will be unlocked
 public  void unlockForeground() 
    unlock the lock for the foreground locked case the lock will be unlocked if foregroundRefCount was 1; otherwise it will decrement the foregroundRefCount and the lock will remain foreground locked
 public  void unlockForegroundCompletely() 
    unlock the lock this is a force unlock; foregroundRefCount is ignored