@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getFunctionIDBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, functionID_); } { int dataSize = 0; for (int i = 0; i < groupName_.size(); i++) { dataSize += computeStringSizeNoTag(groupName_.getRaw(i)); } size += dataSize; size += 1 * getGroupNameList().size(); } if (arguments_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getArguments()); } 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) + FUNCTIONID_FIELD_NUMBER; hash = (53 * hash) + getFunctionID().hashCode(); if (getGroupNameCount() > 0) { hash = (37 * hash) + GROUPNAME_FIELD_NUMBER; hash = (53 * hash) + getGroupNameList().hashCode(); } if (hasArguments()) { hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER; hash = (53 * hash) + getArguments().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.FunctionAPI.ExecuteFunctionOnGroupRequest)) { return super.equals(obj); } org.apache.geode.internal.protocol.protobuf.v1.FunctionAPI.ExecuteFunctionOnGroupRequest other = (org.apache.geode.internal.protocol.protobuf.v1.FunctionAPI.ExecuteFunctionOnGroupRequest) obj; boolean result = true; result = result && getFunctionID() .equals(other.getFunctionID()); result = result && getGroupNameList() .equals(other.getGroupNameList()); result = result && (hasArguments() == other.hasArguments()); if (hasArguments()) { result = result && getArguments() .equals(other.getArguments()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@Override public Result<FunctionAPI.ExecuteFunctionOnGroupResponse> process( ProtobufSerializationService serializationService, FunctionAPI.ExecuteFunctionOnGroupRequest request, MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException, DecodingException, EncodingException { final String functionID = request.getFunctionID(); List<String> memberNameList = request.getGroupNameList(); Object arguments = getFunctionArguments(request, serializationService); List<Object> results = messageExecutionContext.getSecureCache().getFunctionService() .executeFunctionOnGroups(functionID, arguments, memberNameList); final FunctionAPI.ExecuteFunctionOnGroupResponse.Builder responseMessage = FunctionAPI.ExecuteFunctionOnGroupResponse.newBuilder(); results.stream().map(serializationService::encode).forEach(responseMessage::addResults); return Success.of(responseMessage.build()); }