private boolean isNotValidForReplication( AbstractChangeOperationContext ctx ) { if ( ctx.isGenerateNoReplEvt() ) { return true; } return isMmrConfiguredToReceiver( ctx ); }
/** * checks if the sender of this replication event is setup with MMR * (Note: this method is used to prevent sending a replicated event back to the sender after * performing local update) * @param ctx the operation's context * @return true if the rid present in operation context is same as the event log's ID, false otherwise */ private boolean isMmrConfiguredToReceiver( AbstractChangeOperationContext ctx ) { if ( ctx.isReplEvent() ) { boolean skip = ( ctx.getRid() == consumerMsgLog.getId() ); if ( skip ) { LOG.debug( "RID in operation context matches with the ID of replication event log {} for host {}", consumerMsgLog.getName(), consumerMsgLog.getHostName() ); } return skip; } return false; }