public void onEntryEvent(EntryEvent event) {
if (endpoint.live()) {
Data key = serializationService.toData(event.getKey());
Data value = serializationService.toData(event.getValue());
Data oldValue = serializationService.toData(event.getOldValue());
final EntryEventType type = event.getEventType();
final String uuid = event.getMember().getUuid();
PortableEntryEvent portableEntryEvent = new PortableEntryEvent(key, value, oldValue, type, uuid);
endpoint.sendEvent(portableEntryEvent, getCallId());
}
}
@Override
public void onMapEvent(MapEvent event) {
if (endpoint.live()) {
final EntryEventType type = event.getEventType();
final String uuid = event.getMember().getUuid();
PortableEntryEvent portableEntryEvent =
new PortableEntryEvent(type, uuid, event.getNumberOfEntriesAffected());
endpoint.sendEvent(portableEntryEvent, getCallId());
}