use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class InternalPartitionServiceImpl method firePartitionStateOperation.
private List<Future<Boolean>> firePartitionStateOperation(Collection<MemberImpl> members, PartitionRuntimeState partitionState, OperationService operationService) {
final ClusterServiceImpl clusterService = node.clusterService;
List<Future<Boolean>> calls = new ArrayList<Future<Boolean>>(members.size());
for (MemberImpl member : members) {
if (!(member.localMember() || clusterService.isMemberRemovedWhileClusterIsNotActive(member.getAddress()))) {
try {
Address address = member.getAddress();
PartitionStateOperation operation = new PartitionStateOperation(partitionState, true);
Future<Boolean> f = operationService.invokeOnTarget(SERVICE_NAME, operation, address);
calls.add(f);
} catch (Exception e) {
logger.finest(e);
}
}
}
return calls;
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class HeartbeatOperation method run.
@Override
public void run() {
ClusterServiceImpl service = getService();
MemberImpl member = service.getMember(getCallerAddress());
if (member == null) {
ILogger logger = getLogger();
if (logger.isFineEnabled()) {
logger.fine("Heartbeat received from an unknown endpoint: " + getCallerAddress());
}
return;
}
service.getClusterHeartbeatManager().onHeartbeat(member, timestamp);
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class JoinRequestOperation method run.
@Override
public void run() {
ClusterServiceImpl cm = getService();
cm.getClusterJoinManager().handleJoinRequest(request, getConnection());
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class LockClusterStateOperation method run.
@Override
public void run() throws Exception {
ClusterServiceImpl service = getService();
ClusterStateManager clusterStateManager = service.getClusterStateManager();
ClusterState state = clusterStateManager.getState();
if (state == ClusterState.IN_TRANSITION) {
getLogger().info("Extending cluster state lock. Initiator: " + initiator + ", lease-time: " + leaseTime);
} else {
getLogger().info("Locking cluster state. Initiator: " + initiator + ", lease-time: " + leaseTime);
}
clusterStateManager.lockClusterState(stateChange, initiator, txnId, leaseTime, partitionStateVersion);
}
use of com.hazelcast.internal.cluster.impl.ClusterServiceImpl in project hazelcast by hazelcast.
the class MasterDiscoveryOperation method run.
@Override
public void run() {
ClusterServiceImpl cm = getService();
cm.getClusterJoinManager().answerMasterQuestion(joinMessage, getConnection());
}
Aggregations