use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.
the class JoinRequestOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
request = new JoinRequest();
request.readData(in);
}
use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.
the class Node method createJoinRequest.
public JoinRequest createJoinRequest(boolean withCredentials) {
final Credentials credentials = (withCredentials && securityContext != null) ? securityContext.getCredentialsFactory().newCredentials() : null;
final Set<String> excludedMemberUuids = nodeExtension.getInternalHotRestartService().getExcludedMemberUuids();
return new JoinRequest(Packet.VERSION, buildInfo.getBuildNumber(), version, address, localMember.getUuid(), localMember.isLiteMember(), createConfigCheck(), credentials, localMember.getAttributes(), excludedMemberUuids);
}
use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.
the class DefaultNodeExtensionTest method test_joinRequestFails_whenOtherMinorVersion.
@Test
public void test_joinRequestFails_whenOtherMinorVersion() throws UnknownHostException {
MemberVersion otherPatchVersion = MemberVersion.of(node.getVersion().getMajor(), node.getVersion().getMinor() + 1, node.getVersion().getPatch());
JoinRequest joinRequest = new JoinRequest(Packet.VERSION, BUILD_INFO.getBuildNumber(), otherPatchVersion, new Address("127.0.0.1", 9999), UuidUtil.newUnsecureUuidString(), false, null, null, null, null);
expected.expect(VersionMismatchException.class);
nodeExtension.validateJoinRequest(joinRequest);
}
use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.
the class DefaultNodeExtensionTest method test_joinRequestAllowed_whenOtherPatchVersion.
@Test
public void test_joinRequestAllowed_whenOtherPatchVersion() throws UnknownHostException {
MemberVersion otherPatchVersion = MemberVersion.of(node.getVersion().getMajor(), node.getVersion().getMinor(), node.getVersion().getPatch() + 1);
JoinRequest joinRequest = new JoinRequest(Packet.VERSION, BUILD_INFO.getBuildNumber(), otherPatchVersion, new Address("127.0.0.1", 9999), UuidUtil.newUnsecureUuidString(), false, null, null, null, null);
nodeExtension.validateJoinRequest(joinRequest);
}
use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.
the class DefaultNodeExtensionTest method test_joinRequestAllowed_whenSameVersion.
@Test
public void test_joinRequestAllowed_whenSameVersion() throws UnknownHostException {
JoinRequest joinRequest = new JoinRequest(Packet.VERSION, BUILD_INFO.getBuildNumber(), node.getVersion(), new Address("127.0.0.1", 9999), UuidUtil.newUnsecureUuidString(), false, null, null, null, null);
nodeExtension.validateJoinRequest(joinRequest);
}
Aggregations