org.apache.hadoop.hbase
Interface InterProcessReadWriteLock

All Known Implementing Classes:
ZKInterProcessReadWriteLock

@InterfaceAudience.Private
public interface InterProcessReadWriteLock

An interface for a distributed reader-writer lock.


Method Summary
 InterProcessLock readLock(byte[] metadata)
          Obtain a reader lock containing given metadata.
 InterProcessLock writeLock(byte[] metadata)
          Obtain a writer lock containing given metadata.
 

Method Detail

readLock

InterProcessLock readLock(byte[] metadata)
Obtain a reader lock containing given metadata.

Parameters:
metadata - Serialized lock metadata (this may contain information such as the process owning the lock or the purpose for which the lock was acquired). Must not be null.
Returns:
An instantiated InterProcessReadWriteLock instance

writeLock

InterProcessLock writeLock(byte[] metadata)
Obtain a writer lock containing given metadata.

Parameters:
metadata - See documentation of metadata parameter in readLock()
Returns:
An instantiated InterProcessReadWriteLock instance


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