public boolean isSameGroup(ConfigCheck found) { if (!equals(groupName, found.groupName)) { return false; } return true; }
public boolean isSameGroup(ConfigCheck found) { if (!equals(groupName, found.groupName)) { return false; } return true; }
private void verifyJoiner(ConfigCheck found) { if (!equals(joinerType, found.joinerType)) { throw new ConfigMismatchException("Incompatible joiners! expected: " + joinerType + ", found: " + found.joinerType); } }
private void verifyJoiner(ConfigCheck found) { if (!equals(joinerType, found.joinerType)) { throw new ConfigMismatchException("Incompatible joiners! expected: " + joinerType + ", found: " + found.joinerType); } }
private void verifyPartitionCount(ConfigCheck found) { String expectedPartitionCount = properties.get(PARTITION_COUNT.getName()); String foundPartitionCount = found.properties.get(PARTITION_COUNT.getName()); if (!equals(expectedPartitionCount, foundPartitionCount)) { throw new ConfigMismatchException("Incompatible partition count! expected: " + expectedPartitionCount + ", found: " + foundPartitionCount); } }
private void verifyApplicationValidationToken(ConfigCheck found) { String expectedValidationToken = properties.get(APPLICATION_VALIDATION_TOKEN.getName()); String foundValidationToken = found.properties.get(APPLICATION_VALIDATION_TOKEN.getName()); if (!equals(expectedValidationToken, foundValidationToken)) { throw new ConfigMismatchException("Incompatible '" + APPLICATION_VALIDATION_TOKEN + "'! expected: " + expectedValidationToken + ", found: " + foundValidationToken); } }
private void verifyApplicationValidationToken(ConfigCheck found) { String expectedValidationToken = properties.get(APPLICATION_VALIDATION_TOKEN.getName()); String foundValidationToken = found.properties.get(APPLICATION_VALIDATION_TOKEN.getName()); if (!equals(expectedValidationToken, foundValidationToken)) { throw new ConfigMismatchException("Incompatible '" + APPLICATION_VALIDATION_TOKEN + "'! expected: " + expectedValidationToken + ", found: " + foundValidationToken); } }
private void verifyPartitionCount(ConfigCheck found) { String expectedPartitionCount = properties.get(PARTITION_COUNT.getName()); String foundPartitionCount = found.properties.get(PARTITION_COUNT.getName()); if (!equals(expectedPartitionCount, foundPartitionCount)) { throw new ConfigMismatchException("Incompatible partition count! expected: " + expectedPartitionCount + ", found: " + foundPartitionCount); } }
/** * Checks if two Hazelcast configurations are compatible. * * @param found the {@link ConfigCheck} to compare this to * @return true if compatible. False if part of another group. * @throws ConfigMismatchException if the configuration is not compatible. * An exception is thrown so we can pass a nice message. */ public boolean isCompatible(ConfigCheck found) { // check group-properties. if (!equals(groupName, found.groupName)) { return false; } verifyJoiner(found); verifyPartitionGroup(found); verifyPartitionCount(found); verifyApplicationValidationToken(found); return true; }
/** * Checks if two Hazelcast configurations are compatible. * * @param found the {@link ConfigCheck} to compare this to * @return true if compatible. False if part of another group. * @throws ConfigMismatchException if the configuration is not compatible. * An exception is thrown so we can pass a nice message. */ public boolean isCompatible(ConfigCheck found) { // check group-properties. if (!equals(groupName, found.groupName)) { return false; } verifyJoiner(found); verifyPartitionGroup(found); verifyPartitionCount(found); verifyApplicationValidationToken(found); return true; }