config.getGroupConfig().setName("SonarQube");
private void handleGroup(Node node) { for (Node n : childElements(node)) { String value = getTextContent(n).trim(); String nodeName = cleanNodeName(n); if ("name".equals(nodeName)) { config.getGroupConfig().setName(value); } else if ("password".equals(nodeName)) { config.getGroupConfig().setPassword(value); } } }
private void handleGroup(Node node) { for (Node n : childElements(node)) { String value = getTextContent(n).trim(); String nodeName = cleanNodeName(n); if ("name".equals(nodeName)) { config.getGroupConfig().setName(value); } else if ("password".equals(nodeName)) { config.getGroupConfig().setPassword(value); } } }
public XAResourceImpl(NodeEngine nodeEngine, XAService service) { super(nodeEngine, service); GroupConfig groupConfig = nodeEngine.getConfig().getGroupConfig(); groupName = groupConfig.getName(); logger = nodeEngine.getLogger(getClass()); }
private AuthenticationStatus authenticate(UsernamePasswordCredentials credentials) { GroupConfig groupConfig = nodeEngine.getConfig().getGroupConfig(); String nodeGroupName = groupConfig.getName(); boolean usernameMatch = nodeGroupName.equals(credentials.getUsername()); return usernameMatch ? AUTHENTICATED : CREDENTIALS_FAILED; }
private AuthenticationStatus authenticate(UsernamePasswordCredentials credentials) { GroupConfig groupConfig = nodeEngine.getConfig().getGroupConfig(); String nodeGroupName = groupConfig.getName(); boolean usernameMatch = nodeGroupName.equals(credentials.getUsername()); return usernameMatch ? AuthenticationStatus.AUTHENTICATED : AuthenticationStatus.CREDENTIALS_FAILED; }
public com.hazelcast.config.Config getHazelcastConfig() { System.setProperty("hazelcast.logging.type", "slf4j"); com.hazelcast.config.Config hzlCfg = new ClasspathXmlConfig(getHazelcastConfigFile()); hzlCfg.getGroupConfig().setName(HAZELCAST_FF_GROUP_NAME); return hzlCfg; }
public XAResourceImpl(NodeEngine nodeEngine, XAService service) { super(nodeEngine, service); GroupConfig groupConfig = nodeEngine.getConfig().getGroupConfig(); groupName = groupConfig.getName(); logger = nodeEngine.getLogger(getClass()); }
private boolean checkCredentials(HttpPostCommand command) throws UnsupportedEncodingException { byte[] data = command.getData(); final String[] strList = bytesToString(data).split("&"); if (strList.length < 2) { return false; } final String groupName = URLDecoder.decode(strList[0], "UTF-8"); final String groupPass = URLDecoder.decode(strList[1], "UTF-8"); final GroupConfig groupConfig = textCommandService.getNode().getConfig().getGroupConfig(); return groupConfig.getName().equals(groupName) && groupConfig.getPassword().equals(groupPass); }
@Override public void run() { GroupConfig groupConfig = getNodeEngine().getConfig().getGroupConfig(); if (!groupName.equals(groupConfig.getName())) { response = Boolean.FALSE; } else if (!groupPassword.equals(groupConfig.getPassword())) { response = Boolean.FALSE; } }
@ManagedAnnotation("groupName") @ManagedDescription("Group Name") public String getGroupName() { return config.getGroupConfig().getName(); }
@ManagedAnnotation("groupName") @ManagedDescription("Group Name") public String getGroupName() { return config.getGroupConfig().getName(); }
private static Config defaultHazelcastConfig() { Config config = new Config(); config.getNetworkConfig().getJoin().getMulticastConfig().setMulticastPort(DEFAULT_JET_MULTICAST_PORT); config.getGroupConfig().setName(DEFAULT_GROUP_NAME); config.getGroupConfig().setPassword(DEFAULT_GROUP_PASSWORD); return config; } }
private URL newGetTaskUrl() throws IOException { GroupConfig groupConfig = instance.getConfig().getGroupConfig(); Address localAddress = instance.node.getClusterService().getLocalMember().getAddress(); String urlString = cleanupUrl(managementCenterUrl) + "getTask.do?member=" + localAddress.getHost() + ":" + localAddress.getPort() + "&cluster=" + encode(groupConfig.getName(), "UTF-8"); return new URL(urlString); }
private URL newGetTaskUrl() throws IOException { GroupConfig groupConfig = instance.getConfig().getGroupConfig(); Address localAddress = instance.node.getClusterService().getLocalMember().getAddress(); String urlString = cleanupUrl(managementCenterUrl) + "getTask.do?member=" + localAddress.getHost() + ":" + localAddress.getPort() + "&cluster=" + encode(groupConfig.getName(), "UTF-8"); return new URL(urlString); }
protected static Config newProgrammaticConfig() { Config config = new Config(); config.setProperty("hazelcast.merge.first.run.delay.seconds", "5"); config.setProperty("hazelcast.merge.next.run.delay.seconds", "3"); config.getGroupConfig().setName(generateRandomString(10)); return config; }
protected static Config newDeclarativeConfig() { try { Config config = new XmlConfigBuilder("src/main/resources/hazelcast-splitbrain.xml").build(); config.setProperty("hazelcast.merge.first.run.delay.seconds", "5"); config.setProperty("hazelcast.merge.next.run.delay.seconds", "3"); config.getGroupConfig().setName(generateRandomString(10)); return config; } catch (FileNotFoundException e) { throw ExceptionUtil.rethrow(e); } }
@Override public void run() { JetService service = getService(); HazelcastInstance instance = service.getJetInstance().getHazelcastInstance(); Cluster cluster = instance.getCluster(); String name = instance.getConfig().getGroupConfig().getName(); response = new ClusterMetadata(name, cluster); }
private static Config getConfigClusterB() { Config config = new Config(); config.setLicenseKey(ENTERPRISE_LICENSE_KEY); config.getGroupConfig().setName("clusterB").setPassword("clusterB-pass"); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true).addMember("127.0.0.1:5702"); return config; } }
private Config getConfigClusterB() { Config config = new Config(); config.setLicenseKey(ENTERPRISE_LICENSE_KEY); config.getGroupConfig().setName("clusterB").setPassword("clusterB-pass"); config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true).addMember("127.0.0.1:5702"); config.setInstanceName("clusterB"); config.getNetworkConfig().setPort(5702); config.setClassLoader(createCacheManagerClassLoader()); return config; }