@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 (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().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.RemoveRequest)) { return super.equals(obj); } org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.RemoveRequest other = (org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.RemoveRequest) obj; boolean result = true; result = result && getRegionName() .equals(other.getRegionName()); result = result && (hasKey() == other.hasKey()); if (hasKey()) { result = result && getKey() .equals(other.getKey()); } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.RemoveRequest other) { if (other == org.apache.geode.internal.protocol.protobuf.v1.RegionAPI.RemoveRequest.getDefaultInstance()) return this; if (!other.getRegionName().isEmpty()) { regionName_ = other.regionName_; onChanged(); } if (other.hasKey()) { mergeKey(other.getKey()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public Result<RegionAPI.RemoveResponse> process(ProtobufSerializationService serializationService, RegionAPI.RemoveRequest request, MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException, DecodingException { String regionName = request.getRegionName(); Object decodedKey = serializationService.decode(request.getKey()); if (decodedKey == null) { return Failure.of(BasicTypes.ErrorCode.INVALID_REQUEST, "NULL is not a valid key for removal."); } messageExecutionContext.getSecureCache().remove(regionName, decodedKey); return Success.of(RegionAPI.RemoveResponse.newBuilder().build()); } }
/** * <code>string regionName = 1;</code> */ public Builder clearRegionName() { regionName_ = getDefaultInstance().getRegionName(); onChanged(); return this; } /**