synchronized int getWriteHoldCount() { return isWriteLockedByCurrentThread() ? writeHolds_ : 0; }
synchronized int getWriteHoldCount() { return isWriteLockedByCurrentThread() ? writeHolds_ : 0; }
synchronized int getWriteHoldCount() { return isWriteLockedByCurrentThread() ? writeHolds_ : 0; }
/** * Queries if the write lock is held by the current thread. * * @return {@code true} if the current thread holds the write lock and * {@code false} otherwise */ public boolean isWriteLockedByCurrentThread() { return sync.isWriteLockedByCurrentThread(); }
/** * Queries if the write lock is held by the current thread. * * @return {@code true} if the current thread holds the write lock and * {@code false} otherwise */ public boolean isWriteLockedByCurrentThread() { return sync.isWriteLockedByCurrentThread(); }
/** * Queries if this write lock is held by the current thread. * Identical in effect to {@link * ReentrantReadWriteLock#isWriteLockedByCurrentThread}. * * @return {@code true} if the current thread holds this lock and * {@code false} otherwise * @since 1.6 */ public boolean isHeldByCurrentThread() { return lock.sync.isWriteLockedByCurrentThread(); }
/** * Queries if this write lock is held by the current thread. * Identical in effect to {@link * ReentrantReadWriteLock#isWriteLockedByCurrentThread}. * * @return {@code true} if the current thread holds this lock and * {@code false} otherwise * @since 1.6 */ public boolean isHeldByCurrentThread() { return lock.sync.isWriteLockedByCurrentThread(); }
/** * Queries if the write lock is held by the current thread. * * @return {@code true} if the current thread holds the write lock and * {@code false} otherwise */ public boolean isWriteLockedByCurrentThread() { return sync.isWriteLockedByCurrentThread(); }
/** * Queries if this write lock is held by the current thread. * Identical in effect to {@link * ReentrantReadWriteLock#isWriteLockedByCurrentThread}. * * @return {@code true} if the current thread holds this lock and * {@code false} otherwise * @since 1.6 */ public boolean isHeldByCurrentThread() { return lock.sync.isWriteLockedByCurrentThread(); }