Toggle navigation
Home
java.util.Set<java.lang.String> to java.net.URI
No. of Instances - 1
No. of Commits - 1
No. of Projects - {'redisson'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Jdk -> Jdk
Mapping:
Rename Variable
addedSlaves
to
addr
addedSlaves
to
addr
Add or Remove Method invocation
onSlaveAdded(addedSlaves,addr,msg)
to
onSentinelAdded(cfg,msg)
onSlaveDown(freezeSlaves,addr,msg)
to
onSlaveAdded(addr,msg)
onMasterChange(cfg,master,addr,msg)
to
onMasterChange(cfg,addr,msg)
log.info("subscribed to channel: {} from Sentinel {}:{}",channel,addr.getHost(),addr.getPort())
to
log.debug("subscribed to channel: {} from Sentinel {}:{}",channel,addr.getHost(),addr.getPort())
Update Anonymous class
{ @Override public void onMessage( String channel, String msg){ if ("+slave".equals(channel)) { onSlaveAdded(addedSlaves,addr,msg); } if ("+sdown".equals(channel)) { onSlaveDown(freezeSlaves,addr,msg); } if ("-sdown".equals(channel)) { onSlaveUp(freezeSlaves,addr,msg); } if ("+switch-master".equals(channel)) { onMasterChange(cfg,master,addr,msg); } } @Override public boolean onStatus( PubSubType type, String channel){ if (type == PubSubType.SUBSCRIBE) { log.info("subscribed to channel: {} from Sentinel {}:{}",channel,addr.getHost(),addr.getPort()); } return true; } }
to
{ @Override public void onMessage( String channel, String msg){ if ("+sentinel".equals(channel)) { onSentinelAdded(cfg,msg); } if ("+slave".equals(channel)) { onSlaveAdded(addr,msg); } if ("+sdown".equals(channel)) { onSlaveDown(addr,msg); } if ("-sdown".equals(channel)) { onSlaveUp(addr,msg); } if ("+switch-master".equals(channel)) { onMasterChange(cfg,addr,msg); } } @Override public boolean onStatus( PubSubType type, String channel){ if (type == PubSubType.SUBSCRIBE) { log.debug("subscribed to channel: {} from Sentinel {}:{}",channel,addr.getHost(),addr.getPort()); } return true; } }