Support read/write locking.

This commit is contained in:
Peter Lawrey
2014-10-24 11:23:15 +01:00
parent 3a3c634a19
commit c44aae129f
3 changed files with 79 additions and 40 deletions
@@ -26,11 +26,15 @@ import java.util.Map;
*/
interface SharedSegment<K, V> {
void lock();
void readLock();
void writeLock();
Map.Entry<K, V> getEntry(long pos);
void unlock();
void readUnlock();
void writeUnlock();
NativeBytes entry(long pos);