void Member::readData(serialization::ObjectDataInput &reader) { address.readData(reader); uuid = *reader.readUTF(); liteMember = reader.readBoolean(); int size = reader.readInt(); for (int i = 0; i < size; i++) { std::auto_ptr<std::string> key = reader.readUTF(); byte readByte = reader.readByte(); if (readByte == util::IOUtil::PRIMITIVE_TYPE_BOOLEAN) { boolAttributes[*key] = reader.readBoolean(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_BYTE) { byteAttributes[*key] = reader.readByte(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_DOUBLE) { doubleAttributes[*key] = reader.readDouble(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_FLOAT) { floatAttributes[*key] = reader.readFloat(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_INTEGER) { intAttributes[*key] = reader.readInt(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_LONG) { longAttributes[*key] = reader.readLong(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_SHORT) { shortAttributes[*key] = reader.readShort(); } else if (readByte == util::IOUtil::PRIMITIVE_TYPE_UTF) { stringAttributes[*key] = *reader.readUTF(); } } }
void Address::readData(serialization::ObjectDataInput &in) { port = in.readInt(); type = in.readByte(); int len = in.readInt(); if (len > 0) { std::vector<byte> bytes; in.readFully(bytes); host.clear(); host.append(bytes.begin(), bytes.end()); } }
void ClientMembershipEvent::readData(serialization::ObjectDataInput &reader) { member.readData(reader); int t = reader.readInt(); if (t == MembershipEvent::MEMBER_ADDED) { eventType = MembershipEvent::MEMBER_ADDED; } else if (t == MembershipEvent::MEMBER_REMOVED) { eventType = MembershipEvent::MEMBER_REMOVED; } else if (t == MembershipEvent::MEMBER_ATTRIBUTE_CHANGED) { eventType = MembershipEvent::MEMBER_ATTRIBUTE_CHANGED; } if (reader.readBoolean()) { memberAttributeChange.reset(new impl::MemberAttributeChange()); memberAttributeChange->readData(reader); } }
void TestDataSerializable::readData(serialization::ObjectDataInput& reader) { c = reader.readChar(); i = reader.readInt(); }