@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getRegionNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionName_); } if (entry_ != null) { output.writeMessage(2, getEntry()); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getRegionNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionName_); } if (entry_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getEntry()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REGIONNAME_FIELD_NUMBER; hash = (53 * hash) + getRegionName().hashCode(); if (hasEntry()) { hash = (37 * hash) + ENTRY_FIELD_NUMBER; hash = (53 * hash) + getEntry().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.PutRequest)) { return super.equals(obj); } org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.PutRequest other = (org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.PutRequest) obj; boolean result = true; result = result && getRegionName() .equals(other.getRegionName()); result = result && (hasEntry() == other.hasEntry()); if (hasEntry()) { result = result && getEntry() .equals(other.getEntry()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Result<RegionAPI.PutResponse> process(ProtobufSerializationService serializationService, RegionAPI.PutRequest request, MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException, DecodingException { String regionName = request.getRegionName(); BasicTypes.Entry entry = request.getEntry(); Object decodedValue = serializationService.decode(entry.getValue()); Object decodedKey = serializationService.decode(entry.getKey()); SecureCache cache = messageExecutionContext.getSecureCache(); cache.put(regionName, decodedKey, decodedValue); return Success.of(RegionAPI.PutResponse.newBuilder().build()); } }
/** * <code>.org.apache.geode.internal.protocol.protobuf.v1.Entry entry = 2;</code> */ public org.apache.geode.internal.protocol.protobuf.v1.BasicTypes.EntryOrBuilder getEntryOrBuilder() { return getEntry(); }
public Builder mergeFrom(org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.PutRequest other) { if (other == org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.PutRequest.getDefaultInstance()) return this; if (!other.getRegionName().isEmpty()) { regionName_ = other.regionName_; onChanged(); } if (other.hasEntry()) { mergeEntry(other.getEntry()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }