HBASE-16948 Fix inconsistency between HRegion and Region javadoc on getRowLock
This commit is contained in:
parent
c776b3144d
commit
8d9b9dc6b7
|
@ -5247,16 +5247,6 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
|
|||
return getRowLock(row, false);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get a row lock for the specified row. All locks are reentrant.
|
||||
*
|
||||
* Before calling this function make sure that a region operation has already been
|
||||
* started (the calling thread has already acquired the region-close-guard lock).
|
||||
* @param row The row actions will be performed against
|
||||
* @param readLock is the lock reader or writer. True indicates that a non-exlcusive
|
||||
* lock is requested
|
||||
*/
|
||||
@Override
|
||||
public RowLock getRowLock(byte[] row, boolean readLock) throws IOException {
|
||||
checkRow(row, "row lock");
|
||||
|
|
|
@ -281,15 +281,23 @@ public interface Region extends ConfigurationObserver {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tries to acquire a lock on the given row.
|
||||
* @param waitForLock if true, will block until the lock is available.
|
||||
* Otherwise, just tries to obtain the lock and returns
|
||||
* false if unavailable.
|
||||
* @return the row lock if acquired,
|
||||
* null if waitForLock was false and the lock was not acquired
|
||||
* @throws IOException if waitForLock was true and the lock could not be acquired after waiting
|
||||
*
|
||||
* Get a row lock for the specified row. All locks are reentrant.
|
||||
*
|
||||
* Before calling this function make sure that a region operation has already been
|
||||
* started (the calling thread has already acquired the region-close-guard lock).
|
||||
*
|
||||
* NOTE: the boolean passed here has changed. It used to be a boolean that
|
||||
* stated whether or not to wait on the lock. Now it is whether it an exclusive
|
||||
* lock is requested.
|
||||
*
|
||||
* @param row The row actions will be performed against
|
||||
* @param readLock is the lock reader or writer. True indicates that a non-exclusive
|
||||
* lock is requested
|
||||
* @see #startRegionOperation()
|
||||
* @see #startRegionOperation(Operation)
|
||||
*/
|
||||
RowLock getRowLock(byte[] row, boolean waitForLock) throws IOException;
|
||||
RowLock getRowLock(byte[] row, boolean readLock) throws IOException;
|
||||
|
||||
/**
|
||||
* If the given list of row locks is not null, releases all locks.
|
||||
|
|
Loading…
Reference in New Issue