Fix IllegalMonitorStateException in RedisCache

DATAREDIS-214
This commit is contained in:
Jennifer Hickey
2013-07-11 11:49:13 -07:00
parent 0729055381
commit 5c055286f4
2 changed files with 39 additions and 30 deletions

View File

@@ -38,6 +38,7 @@ class RedisCache implements Cache {
private static final int PAGE_SIZE = 128;
private final String name;
@SuppressWarnings("rawtypes")
private final RedisTemplate template;
private final byte[] prefix;
private final byte[] setName;
@@ -188,7 +189,7 @@ class RedisCache implements Cache {
if (connection.exists(cacheLockName)) {
foundLock = true;
try {
Thread.currentThread().wait(WAIT_FOR_LOCK);
Thread.sleep(WAIT_FOR_LOCK);
} catch (InterruptedException ex) {
// ignore
}