1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
import java.util.*; |
8 |
|
import java.util.concurrent.*; |
9 |
|
import java.util.concurrent.locks.*; |
10 |
|
|
11 |
– |
|
11 |
|
/** |
12 |
|
* This is an incomplete implementation of a wrapper class |
13 |
|
* that places read-write locks around unsynchronized Maps. |
14 |
|
* Exists as a sample input for MapLoops test. |
15 |
|
*/ |
17 |
– |
|
16 |
|
public class RLMap implements Map { |
17 |
|
private final Map m; |
18 |
|
private final ReentrantLock rl = new ReentrantLock(); |