001    package railo.commons.lock;
002    
003    
004    public interface Lock {
005            public void lock(long timeout) throws LockException, LockInterruptedException;
006    
007            public void unlock();
008            
009            /**
010         * Returns an estimate of the number of threads waiting to
011         * acquire this lock.  The value is only an estimate because the number of
012         * threads may change dynamically while this method traverses
013         * internal data structures.  This method is designed for use in
014         * monitoring of the system state, not for synchronization
015         * control.
016         *
017         * @return the estimated number of threads waiting for this lock
018         */
019        public int getQueueLength();
020    }