use of com.hazelcast.instance.Node in project hazelcast by hazelcast.
the class BeforeJoinCheckFailureOperation method run.
@Override
public void run() {
final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
final Node node = nodeEngine.getNode();
if (node.joined()) {
throw new IllegalStateException("Node is already joined but received a termination message! " + "Reason: " + failReasonMsg);
}
final ILogger logger = nodeEngine.getLogger("com.hazelcast.security");
logger.severe("Node could not join cluster. Before join check failed node is going to shutdown now!");
logger.severe("Reason of failure for node join : " + failReasonMsg);
node.shutdown(true);
}
use of com.hazelcast.instance.Node in project hazelcast by hazelcast.
the class GroupMismatchOperation method run.
@Override
public void run() {
NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Connection connection = getConnection();
String message = "Node could not join cluster at node: " + connection.getEndPoint() + " Cause: the target cluster has a different group-name";
connection.close(message, null);
ILogger logger = nodeEngine.getLogger("com.hazelcast.cluster");
logger.warning(message);
Node node = nodeEngine.getNode();
node.getJoiner().blacklist(getCallerAddress(), true);
}
use of com.hazelcast.instance.Node in project hazelcast by hazelcast.
the class ServiceManagerImpl method createService.
private <T> T createService(Class<T> service) {
Node node = nodeEngine.getNode();
NodeExtension nodeExtension = node.getNodeExtension();
return nodeExtension.createService(service);
}
use of com.hazelcast.instance.Node in project hazelcast by hazelcast.
the class ServiceManagerImpl method registerCoreServices.
private void registerCoreServices() {
logger.finest("Registering core services...");
Node node = nodeEngine.getNode();
registerService(ClusterServiceImpl.SERVICE_NAME, node.getClusterService());
registerService(InternalPartitionService.SERVICE_NAME, node.getPartitionService());
registerService(ProxyServiceImpl.SERVICE_NAME, nodeEngine.getProxyService());
registerService(TransactionManagerServiceImpl.SERVICE_NAME, nodeEngine.getTransactionManagerService());
registerService(ClientEngineImpl.SERVICE_NAME, node.clientEngine);
registerService(QuorumServiceImpl.SERVICE_NAME, nodeEngine.getQuorumService());
registerService(WanReplicationService.SERVICE_NAME, nodeEngine.getWanReplicationService());
}
use of com.hazelcast.instance.Node in project hazelcast by hazelcast.
the class ListenerLeakTestSmartRouting method testSetListeners.
@Test
public void testSetListeners() {
Collection<Node> nodes = createNodes();
HazelcastInstance client = hazelcastFactory.newHazelcastClient();
ISet<Object> set = client.getSet(randomString());
String id = set.addItemListener(mock(ItemListener.class), false);
Collection<ClientEventRegistration> registrations = getClientEventRegistrations(client, id);
assertTrue(set.removeItemListener(id));
assertNoLeftOver(nodes, client, id, registrations);
}
Aggregations