org.apache.hadoop.hdfs.util
Interface RwLock


public interface RwLock

Read-write lock interface.


Method Summary
 boolean hasReadLock()
          Check if the current thread holds read lock.
 boolean hasReadOrWriteLock()
          Check if the current thread holds read or write lock.
 boolean hasWriteLock()
          Check if the current thread holds write lock.
 void readLock()
          Acquire read lock.
 void readUnlock()
          Release read lock.
 void writeLock()
          Acquire write lock.
 void writeUnlock()
          Release write lock.
 

Method Detail

readLock

void readLock()
Acquire read lock.


readUnlock

void readUnlock()
Release read lock.


hasReadLock

boolean hasReadLock()
Check if the current thread holds read lock.


writeLock

void writeLock()
Acquire write lock.


writeUnlock

void writeUnlock()
Release write lock.


hasWriteLock

boolean hasWriteLock()
Check if the current thread holds write lock.


hasReadOrWriteLock

boolean hasReadOrWriteLock()
Check if the current thread holds read or write lock.



Copyright © 2012 Apache Software Foundation. All Rights Reserved.