org.apache.hadoop.hbase.master
Class TableLockManager.NullTableLockManager

java.lang.Object
  extended by org.apache.hadoop.hbase.master.TableLockManager
      extended by org.apache.hadoop.hbase.master.TableLockManager.NullTableLockManager
Enclosing class:
TableLockManager

@InterfaceAudience.Private
public static class TableLockManager.NullTableLockManager
extends TableLockManager

A null implementation


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.TableLockManager
TableLockManager.NullTableLockManager, TableLockManager.TableLock
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.master.TableLockManager
DEFAULT_TABLE_READ_LOCK_TIMEOUT_MS, DEFAULT_TABLE_WRITE_LOCK_TIMEOUT_MS, TABLE_LOCK_ENABLE, TABLE_READ_LOCK_TIMEOUT_MS, TABLE_WRITE_LOCK_TIMEOUT_MS
 
Constructor Summary
TableLockManager.NullTableLockManager()
           
 
Method Summary
 TableLockManager.TableLock readLock(byte[] tableName, String purpose)
          Returns a TableLock for locking the table for shared access among read-lock holders
 void reapAllTableWriteLocks()
          Force releases all table write locks and lock attempts even if this thread does not own the lock.
 void tableDeleted(byte[] tableName)
          Called after a table has been deleted, and after the table lock is released.
 TableLockManager.TableLock writeLock(byte[] tableName, String purpose)
          Returns a TableLock for locking the table for exclusive access
 
Methods inherited from class org.apache.hadoop.hbase.master.TableLockManager
createTableLockManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableLockManager.NullTableLockManager

public TableLockManager.NullTableLockManager()
Method Detail

writeLock

public TableLockManager.TableLock writeLock(byte[] tableName,
                                            String purpose)
Description copied from class: TableLockManager
Returns a TableLock for locking the table for exclusive access

Specified by:
writeLock in class TableLockManager
Parameters:
tableName - Table to lock
purpose - Human readable reason for locking the table
Returns:
A new TableLock object for acquiring a write lock

readLock

public TableLockManager.TableLock readLock(byte[] tableName,
                                           String purpose)
Description copied from class: TableLockManager
Returns a TableLock for locking the table for shared access among read-lock holders

Specified by:
readLock in class TableLockManager
Parameters:
tableName - Table to lock
purpose - Human readable reason for locking the table
Returns:
A new TableLock object for acquiring a read lock

reapAllTableWriteLocks

public void reapAllTableWriteLocks()
                            throws IOException
Description copied from class: TableLockManager
Force releases all table write locks and lock attempts even if this thread does not own the lock. The behavior of the lock holders still thinking that they have the lock is undefined. This should be used carefully and only when we can ensure that all write-lock holders have died. For example if only the master can hold write locks, then we can reap it's locks when the backup master starts.

Specified by:
reapAllTableWriteLocks in class TableLockManager
Throws:
IOException

tableDeleted

public void tableDeleted(byte[] tableName)
                  throws IOException
Description copied from class: TableLockManager
Called after a table has been deleted, and after the table lock is released. TableLockManager should do cleanup for the table state.

Specified by:
tableDeleted in class TableLockManager
Parameters:
tableName - name of the table
Throws:
IOException - If there is an unrecoverable error releasing the lock


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.