public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getIdentifierBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, resourceMemory_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getNodeIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, virtualCores_); } getUnknownFields().writeTo(output); }
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getIdentifierBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, resourceMemory_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getNodeIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, virtualCores_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasIdentifier()) { hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getIdentifier().hashCode(); } if (hasResourceMemory()) { hash = (37 * hash) + RESOURCE_MEMORY_FIELD_NUMBER; hash = (53 * hash) + getResourceMemory(); } if (hasNodeId()) { hash = (37 * hash) + NODE_ID_FIELD_NUMBER; hash = (53 * hash) + getNodeId().hashCode(); } if (hasVirtualCores()) { hash = (37 * hash) + VIRTUAL_CORES_FIELD_NUMBER; hash = (53 * hash) + getVirtualCores(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
getUnknownFields().equals(other.getUnknownFields()); return result;
public Builder mergeFrom(com.microsoft.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto other) { if (other == com.microsoft.reef.proto.DriverRuntimeProtocol.ResourceAllocationProto.getDefaultInstance()) return this; if (other.hasIdentifier()) { bitField0_ |= 0x00000001; identifier_ = other.identifier_; onChanged(); } if (other.hasResourceMemory()) { setResourceMemory(other.getResourceMemory()); } if (other.hasNodeId()) { bitField0_ |= 0x00000004; nodeId_ = other.nodeId_; onChanged(); } if (other.hasVirtualCores()) { setVirtualCores(other.getVirtualCores()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }