use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class FinalizeJoinOperation method runPostJoinOp.
private void runPostJoinOp() {
if (postJoinOp == null) {
return;
}
ClusterServiceImpl clusterService = getService();
NodeEngineImpl nodeEngine = clusterService.getNodeEngine();
InternalOperationService operationService = nodeEngine.getOperationService();
postJoinOp.setNodeEngine(nodeEngine);
OperationAccessor.setCallerAddress(postJoinOp, getCallerAddress());
OperationAccessor.setConnection(postJoinOp, getConnection());
postJoinOp.setOperationResponseHandler(createEmptyResponseHandler());
operationService.run(postJoinOp);
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class FinalizeJoinOperation method run.
@Override
public void run() throws Exception {
checkLocalMemberUuid();
ClusterServiceImpl clusterService = getService();
Address callerAddress = getConnectionEndpointOrThisAddress();
boolean finalized = clusterService.finalizeJoin(memberInfos, callerAddress, clusterId, clusterState, clusterVersion, clusterStartTime, masterTime);
if (!finalized) {
return;
}
processPartitionState();
sendPostJoinOperations();
runPostJoinOp();
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class MemberRemoveOperation method isCallerValid.
private boolean isCallerValid(Address caller) {
ClusterServiceImpl clusterService = getService();
ILogger logger = getLogger();
if (caller == null) {
if (logger.isFineEnabled()) {
logger.fine("Ignoring removal request of " + address + ", because sender is local or not known.");
}
return false;
}
if (!address.equals(caller) && !caller.equals(clusterService.getMasterAddress())) {
if (logger.isFineEnabled()) {
logger.fine("Ignoring removal request of " + address + ", because sender is neither dead-member " + "nor master: " + caller);
}
return false;
}
return true;
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class RollbackClusterStateOperation method run.
@Override
public void run() throws Exception {
ClusterServiceImpl service = getService();
ClusterStateManager clusterStateManager = service.getClusterStateManager();
getLogger().info("Rolling back cluster state! Initiator: " + initiator);
response = clusterStateManager.rollbackClusterState(txnId);
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class MasterConfirmationOperation method run.
@Override
public void run() {
final Address endpoint = getCallerAddress();
if (endpoint == null) {
return;
}
final ClusterServiceImpl clusterService = getService();
final ILogger logger = getLogger();
final MemberImpl member = clusterService.getMember(endpoint);
if (member == null) {
logger.warning("MasterConfirmation has been received from " + endpoint + ", but it is not a member of this cluster!");
OperationService operationService = getNodeEngine().getOperationService();
operationService.send(new MemberRemoveOperation(clusterService.getThisAddress()), endpoint);
} else {
if (clusterService.isMaster()) {
clusterService.getClusterHeartbeatManager().acceptMasterConfirmation(member, timestamp);
} else {
logger.warning(endpoint + " has sent MasterConfirmation, but this node is not master!");
}
}
}
Aggregations