Source:
public boolean onCustomEvent(DiscoveryCustomMessage msg, AffinityTopologyVersion topVer, ClusterNode node) { if (msg instanceof InitMessage && ((InitMessage)msg).type() == DistributedProcess.DistributedProcessType.START_SNAPSHOT.ordinal()) return true; if (msg instanceof SchemaAbstractDiscoveryMessage) { ctx.query().onDiscovery((SchemaAbstractDiscoveryMessage)msg); return false; } if (msg instanceof CacheAffinityChangeMessage) return sharedCtx.affinity().onCustomEvent(((CacheAffinityChangeMessage)msg)); if (msg instanceof SnapshotDiscoveryMessage && ((SnapshotDiscoveryMessage)msg).needExchange()) return true; if (msg instanceof WalStateAbstractMessage) { WalStateAbstractMessage msg0 = (WalStateAbstractMessage)msg; if (msg0 instanceof WalStateProposeMessage) sharedCtx.walState().onProposeDiscovery((WalStateProposeMessage)msg); else if (msg0 instanceof WalStateFinishMessage) sharedCtx.walState().onFinishDiscovery((WalStateFinishMessage)msg); return msg0.needExchange(); } if (msg instanceof DynamicCacheChangeBatch) { boolean changeRequested = cachesInfo.onCacheChangeRequested((DynamicCacheChangeBatch)msg, topVer); ctx.query().onCacheChangeRequested((DynamicCacheChangeBatch)msg); return changeRequested; } if (msg instanceof DynamicCacheChangeFailureMessage) cachesInfo.onCacheChangeRequested((DynamicCacheChangeFailureMessage)msg, topVer); if (msg instanceof ClientCacheChangeDiscoveryMessage) cachesInfo.onClientCacheChange((ClientCacheChangeDiscoveryMessage)msg, node); if (msg instanceof CacheStatisticsModeChangeMessage) onCacheStatisticsModeChange((CacheStatisticsModeChangeMessage)msg); if (msg instanceof CacheStatisticsClearMessage) onCacheStatisticsClear((CacheStatisticsClearMessage)msg); if (msg instanceof TxTimeoutOnPartitionMapExchangeChangeMessage) sharedCtx.tm().onTxTimeoutOnPartitionMapExchangeChange((TxTimeoutOnPartitionMapExchangeChangeMessage)msg); return false; }

Target:
public boolean onCustomEvent(DiscoveryCustomMessage msg, AffinityTopologyVersion topVer, ClusterNode node) { if (msg instanceof SchemaAbstractDiscoveryMessage) { ctx.query().onDiscovery((SchemaAbstractDiscoveryMessage)msg); return false; } if (msg instanceof CacheAffinityChangeMessage) return sharedCtx.affinity().onCustomEvent(((CacheAffinityChangeMessage)msg)); if (msg instanceof SnapshotDiscoveryMessage && ((SnapshotDiscoveryMessage)msg).needExchange()) return true; if (msg instanceof WalStateAbstractMessage) { WalStateAbstractMessage msg0 = (WalStateAbstractMessage)msg; if (msg0 instanceof WalStateProposeMessage) sharedCtx.walState().onProposeDiscovery((WalStateProposeMessage)msg); else if (msg0 instanceof WalStateFinishMessage) sharedCtx.walState().onFinishDiscovery((WalStateFinishMessage)msg); return msg0.needExchange(); } if (msg instanceof DynamicCacheChangeBatch) { boolean changeRequested = cachesInfo.onCacheChangeRequested((DynamicCacheChangeBatch)msg, topVer); ctx.query().onCacheChangeRequested((DynamicCacheChangeBatch)msg); return changeRequested; } if (msg instanceof DynamicCacheChangeFailureMessage) cachesInfo.onCacheChangeRequested((DynamicCacheChangeFailureMessage)msg, topVer); if (msg instanceof ClientCacheChangeDiscoveryMessage) cachesInfo.onClientCacheChange((ClientCacheChangeDiscoveryMessage)msg, node); if (msg instanceof CacheStatisticsModeChangeMessage) onCacheStatisticsModeChange((CacheStatisticsModeChangeMessage)msg); if (msg instanceof CacheStatisticsClearMessage) onCacheStatisticsClear((CacheStatisticsClearMessage)msg); if (msg instanceof TxTimeoutOnPartitionMapExchangeChangeMessage) sharedCtx.tm().onTxTimeoutOnPartitionMapExchangeChange((TxTimeoutOnPartitionMapExchangeChangeMessage)msg); return false; }