HCOLL-286 HCOLL-292 added replicationEvent flag to event callbacks

This commit is contained in:
leventov
2015-01-28 11:44:20 +07:00
parent 2ed4790eb9
commit 07333660d0
7 changed files with 35 additions and 33 deletions
@@ -766,11 +766,11 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
// put callbacks
onPut(this, pos);
if (bytesEventListener != null) {
bytesEventListener.onPut(entry, 0L, metaDataBytes, valuePos, true);
bytesEventListener.onPut(entry, 0L, metaDataBytes, valuePos, true, false);
}
if (eventListener != null) {
V valueInstance = toValue.toInstance(copies, v, valueSize);
eventListener.onPut(keyInstance, valueInstance, null);
eventListener.onPut(keyInstance, valueInstance, null, false);
}
entryCreated(lock);
return v;
@@ -974,10 +974,10 @@ final class ReplicatedChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? supe
onPutMaybeRemote(segmentState.pos, remote);
if (bytesEventListener != null)
bytesEventListener.onPut(entry, 0L, metaDataBytes,
segmentState.valueSizePos, true);
segmentState.valueSizePos, true, remote);
if (eventListener != null)
eventListener.onPut(toKey.toInstance(copies, key, keySize),
toValue.toInstance(copies, value, valueSize), null);
toValue.toInstance(copies, value, valueSize), null, remote);
return resultUnused ? null : readValue.readNull();
}