private static final Logger LOG = LoggerFactory.getLogger(BaseNodeManager.class);
private final String nodeId;
- private final String topologyId;
- private final ActorSystem actorSystem;
-
- private boolean isMaster = false;
- private NodeManagerCallback delegate;
+ private final NodeManagerCallback delegate;
private BaseNodeManager(final String nodeId,
final String topologyId,
final RoleChangeStrategy roleChangeStrategy) {
LOG.debug("Creating BaseNodeManager, id: {}, {}", topologyId, nodeId );
this.nodeId = nodeId;
- this.topologyId = topologyId;
- this.actorSystem = actorSystem;
this.delegate = delegateFactory.create(nodeId, topologyId, actorSystem);
// if we want to override the place election happens,
// we need to override this with noop election strategy and implement election in callback
(roleChangeDTO.wasOwner() ? "master" : "slave"),
(roleChangeDTO.isOwner() ? "master" : "slave"));
- isMaster = roleChangeDTO.isOwner();
delegate.onRoleChanged(roleChangeDTO);
}