}
@Override
- protected void handleReceive(Object message) throws Exception {
+ protected void handleReceive(Object message) {
if (message instanceof RegisterListener) {
// called by the scheduler at intervals to register any unregistered notifiers
sendRegistrationRequests();
}
private void populateRegistry(String memberName) {
- for (String shard: SHARDS_TO_MONITOR) {
- String notifier = new StringBuilder().append(NOTIFIER_AKKA_URL).append(memberName)
+ String notifier = new StringBuilder().append(NOTIFIER_AKKA_URL).append(memberName)
.append("/").append(memberName).append("-notifier").toString();
- if (!notifierRegistrationStatus.containsKey(notifier)) {
- notifierRegistrationStatus.put(notifier, false);
- }
+ if (!notifierRegistrationStatus.containsKey(notifier)) {
+ notifierRegistrationStatus.put(notifier, false);
}
if (!registrationSchedule.isCancelled()) {
@Override
- public void close() throws Exception {
+ public void close() {
registrationSchedule.cancel();
}
}