private void publishWanReplicationEvent(Data key, Data value, Record record) {
   if (record == null) {
     return;
   }
   if (mapContainer.getWanReplicationPublisher() != null
       && mapContainer.getWanMergePolicy() != null) {
     final EntryView entryView = EntryViews.createSimpleEntryView(key, value, record);
     mapService
         .getMapServiceContext()
         .getMapEventPublisher()
         .publishWanReplicationUpdate(name, entryView);
   }
 }
Esempio n. 2
0
  private void publishWANReplicationEvent(MapEventPublisher mapEventPublisher, Object value) {
    if (!mapContainer.isWanReplicationEnabled()) {
      return;
    }

    Record record = recordStore.getRecord(dataKey);
    if (record == null) {
      return;
    }
    final Data valueConvertedData = mapServiceContext.toData(value);
    final EntryView entryView =
        EntryViews.createSimpleEntryView(dataKey, valueConvertedData, record);
    mapEventPublisher.publishWanReplicationUpdate(name, entryView);
  }
  private void publishWANReplicationEvent(
      MapServiceContext mapServiceContext, MapEventPublisher mapEventPublisher) {
    if (mapContainer.getWanReplicationPublisher() == null
        || mapContainer.getWanMergePolicy() == null) {
      return;
    }

    Record record = recordStore.getRecord(dataKey);
    if (record == null) {
      return;
    }
    final Data valueConvertedData = mapServiceContext.toData(dataValue);
    final EntryView entryView =
        EntryViews.createSimpleEntryView(dataKey, valueConvertedData, record);
    mapEventPublisher.publishWanReplicationUpdate(name, entryView);
  }