コード例 #1
0
 @Test
 public void testGroupConfig() {
   GroupConfig groupConfig = config.getGroupConfig();
   assertNotNull(groupConfig);
   assertEquals("spring-group", groupConfig.getName());
   assertEquals("spring-group-pass", groupConfig.getPassword());
 }
コード例 #2
0
ファイル: Node.java プロジェクト: karanbatra/hazelcast
  public ConfigCheck createConfigCheck() {
    final ConfigCheck configCheck = new ConfigCheck();
    final GroupConfig groupConfig = config.getGroupConfig();
    final PartitionGroupConfig partitionGroupConfig = config.getPartitionGroupConfig();
    final boolean partitionGroupEnabled =
        partitionGroupConfig != null && partitionGroupConfig.isEnabled();

    PartitionGroupConfig.MemberGroupType memberGroupType =
        partitionGroupEnabled
            ? partitionGroupConfig.getGroupType()
            : PartitionGroupConfig.MemberGroupType.PER_MEMBER;
    configCheck
        .setGroupName(groupConfig.getName())
        .setGroupPassword(groupConfig.getPassword())
        .setJoinerType(joiner != null ? joiner.getType() : "")
        .setPartitionGroupEnabled(partitionGroupEnabled)
        .setMemberGroupType(memberGroupType);
    return configCheck;
  }