indigophox commented on code in PR #34817: URL: https://github.com/apache/arrow/pull/34817#discussion_r1418023188
########## java/flight/flight-core/src/main/java/org/apache/arrow/flight/CloseSessionResult.java: ########## @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.arrow.flight; + +import java.io.IOException; +import java.nio.ByteBuffer; + +public class CloseSessionResult { + public enum Status { + /** + * The session close status is unknown. Servers should avoid using this value + * (send a NOT_FOUND error if the requested session is not known). Clients can + * retry the request. + */ + UNSPECIFIED(Flight.CloseSessionResult.Status.UNSPECIFIED), + /** + * The session close request is complete. + */ + CLOSED(Flight.CloseSessionResult.Status.CLOSED), + /** + * The session close request is in progress. The client may retry the request. + */ + CLOSING(Flight.CloseSessionResult.Status.CLOSING), + /** + * The session is not closeable. + */ + NOT_CLOSABLE(Flight.CloseSessionResult.Status.NOT_CLOSABLE), + ; + + private static final Map<Flight.CloseSessionResult.Status, Status> mapFromProto; + + static { + for (Status s : values()) mapFromProto.put(s.proto, s); Review Comment: This is for doing the opposite operation: See https://github.com/apache/arrow/pull/34817/files#diff-2886ce33cf7cf2ef5787483babbe1a07c13b5eaed588726eecc56c34d6d1d438R57-R59 - I believe the thing you're talking about is https://github.com/apache/arrow/pull/34817/files#diff-2886ce33cf7cf2ef5787483babbe1a07c13b5eaed588726eecc56c34d6d1d438R57-R59 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
