use of com.hazelcast.version.MemberVersion in project hazelcast by hazelcast.
the class MemberLeftException method readObject.
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
String uuid = in.readUTF();
String host = in.readUTF();
int port = in.readInt();
boolean liteMember = in.readBoolean();
MemberVersion version = (MemberVersion) in.readObject();
member = new MemberImpl(new Address(host, port), version, false, uuid, null, null, liteMember);
}
use of com.hazelcast.version.MemberVersion in project hazelcast by hazelcast.
the class NodeStateImplTest method toJson.
@Test
public void toJson() throws Exception {
ClusterState clusterState = ClusterState.ACTIVE;
com.hazelcast.instance.NodeState nodeState = com.hazelcast.instance.NodeState.PASSIVE;
Version clusterVersion = Version.of("3.8");
MemberVersion memberVersion = MemberVersion.of("3.9.0");
NodeState state = new NodeStateImpl(clusterState, nodeState, clusterVersion, memberVersion);
NodeState deserialized = new NodeStateImpl();
deserialized.fromJson(state.toJson());
assertEquals(clusterState, deserialized.getClusterState());
assertEquals(nodeState, deserialized.getNodeState());
assertEquals(clusterVersion, deserialized.getClusterVersion());
assertEquals(memberVersion, deserialized.getMemberVersion());
}
Aggregations