enhancements made with peter

This commit is contained in:
Rob Austin
2015-12-16 22:52:03 +00:00
parent 0d716996ea
commit e5633a04ca
2 changed files with 5 additions and 2 deletions
@@ -488,6 +488,9 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
final NativeBytes k = wrap(entry.address() + keyPosition, keySize);
final NativeBytes v = wrap(entry.address() + valuePosition, valueSize);
assert k.remaining() > 0 : "keySize:" + keySize;
assert v.remaining() > 0 : "valueSize:" + valueSize;
return callback.onEntry(k, v,
timestamp,
identifier,
@@ -1865,7 +1865,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
boolean success = false;
try {
success = segmentHeader.tryRWWriteLock(LOCK_OFFSET, lockTimeOutNS);
success = segmentHeader.tryRWReadLock(LOCK_OFFSET, lockTimeOutNS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
@@ -1944,7 +1944,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
public final void readUnlock() {
try {
// segmentHeader.unlockRWReadLock(LOCK_OFFSET);
segmentHeader.unlockRWWriteLock(LOCK_OFFSET);
segmentHeader.unlockRWReadLock(LOCK_OFFSET);
// lock.readLock().unlock();
} catch (IllegalMonitorStateException e) {
errorListener.errorOnUnlock(e);