@Retained
  private CacheEvent getEventForListener(CacheEvent event) {
    Operation op = event.getOperation();
    if (!op.isEntry()) {
      return event;
    } else {
      EntryEventImpl r = (EntryEventImpl) event;
      @Retained
      EntryEventImpl result = r;
      if (r.isSingleHop()) {
        // fix for bug #46130 - origin remote incorrect for one-hop operation in receiver
        result = new EntryEventImpl(r);
        result.setOriginRemote(true);
        // if this is from a non-replicate and it's not in a tx it should be seen as a Create
        // because that's what the sender would use in notifying listeners. bug #46955
        if (result.getOperation().isUpdate() && (result.getTransactionId() == null)) {
          result.makeCreate();
        }
      }
      if (op == Operation.REPLACE) {
        if (result == r) {
          result = new EntryEventImpl(r);
        }
        result.setOperation(Operation.UPDATE);
      } else if (op == Operation.PUT_IF_ABSENT) {
        if (result == r) {
          result = new EntryEventImpl(r);
        }
        result.setOperation(Operation.CREATE);
      } else if (op == Operation.REMOVE) {
        if (result == r) {
          result = new EntryEventImpl(r);
        }
        result.setOperation(Operation.DESTROY);
      }
      return result;
    }
  }
Returns an event for listener notification. The event's operation may be altered to conform to
the ConcurrentMap implementation specification. If the returned value is not == to the event
parameter then the caller is responsible for releasing it.

@param event the original event
@return the original event or a new event having a change in operation
geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java