Class EJBReadWriteLock.WriteLock

    • Constructor Detail

      • WriteLock

        public WriteLock()
    • Method Detail

      • lock

        public void lock()
        Ensures that the current thread doesn't hold any read locks. If the thread holds any read locks, this method throws a IllegalLoopbackException. If no read locks are held, then this method delegates the call to the internal delegate ReentrantReadWriteLock
        Specified by:
        lock in interface Lock
      • lockInterruptibly

        public void lockInterruptibly()
                               throws InterruptedException
        Ensures that the current thread doesn't hold any read locks. If the thread holds any read locks, this method throws a IllegalLoopbackException. If no read locks are held, then this method delegates the call to the internal delegate ReentrantReadWriteLock
        Specified by:
        lockInterruptibly in interface Lock
        Throws:
        InterruptedException
      • tryLock

        public boolean tryLock()
        Ensures that the current thread doesn't hold any read locks. If the thread holds any read locks, this method throws a IllegalLoopbackException. If no read locks are held, then this method delegates the call to the internal delegate ReentrantReadWriteLock
        Specified by:
        tryLock in interface Lock
      • tryLock

        public boolean tryLock​(long time,
                               TimeUnit unit)
                        throws InterruptedException
        Ensures that the current thread doesn't hold any read locks. If the thread holds any read locks, this method throws a IllegalLoopbackException. If no read locks are held, then this method delegates the call to the internal delegate ReentrantReadWriteLock
        Specified by:
        tryLock in interface Lock
        Throws:
        InterruptedException