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 read lock containing given metadata.
 InterProcessLock writeLock(byte[] metadata)
          Obtain a write lock containing given metadata.
 

Method Detail

readLock

InterProcessLock readLock(byte[] metadata)
Obtain a read 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).
Returns:
An instantiated InterProcessLock instance

writeLock

InterProcessLock writeLock(byte[] metadata)
Obtain a write 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).
Returns:
An instantiated InterProcessLock instance


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.