public final class RangeLock<K extends Comparable<K>> extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
RangeLock.Range |
| Constructor and Description |
|---|
RangeLock() |
| Modifier and Type | Method and Description |
|---|---|
RangeLock.Range |
lock(K fromKey,
K toKey)
The same thread can lock a range twice.
|
int |
size() |
void |
unlock(RangeLock.Range lock) |
public RangeLock.Range lock(K fromKey, K toKey)
fromKey - toKey - public void unlock(RangeLock.Range lock)
public int size()
Copyright © 2015. All rights reserved.