forked from apache/geode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEODE-4080: Protobuf JSON objects are in a proto string (apache#1171)
* GEODE-4080: Protobuf JSON objects are in a proto string In the process, remove a couple of serialization-related classes that are no longer really applicable. * Catch `JSONFormatterException` and return it as a `EncodingException`. * Change some names and add ProtobufSerializationService, which is the big reason for all this churn. * Get rid of the codec package * Inline the serialization type enum * Make encoding methods throw EncodingException. * Don't use exceptions for control flow. This meant renaming ProtobufPrimitiveTypes to ProtobufEncodingTypes. Signed-off-by: Brian Rowe <[email protected]>
- Loading branch information
1 parent
635ab6a
commit e24e038
Showing
49 changed files
with
432 additions
and
844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
...org/apache/geode/internal/protocol/serialization/registry/SerializationCodecRegistry.java
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
...nal/protocol/serialization/registry/exception/CodecAlreadyRegisteredForTypeException.java
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
...nternal/protocol/serialization/registry/exception/CodecNotRegisteredForTypeException.java
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...in/resources/META-INF/services/org.apache.geode.internal.protocol.serialization.TypeCodec
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...src/main/java/org/apache/geode/internal/protocol/operations/ProtobufOperationHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* 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.geode.internal.protocol.operations; | ||
|
||
import org.apache.geode.internal.exception.InvalidExecutionContextException; | ||
import org.apache.geode.internal.protocol.MessageExecutionContext; | ||
import org.apache.geode.internal.protocol.Result; | ||
import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol; | ||
import org.apache.geode.internal.protocol.protobuf.v1.ProtobufSerializationService; | ||
import org.apache.geode.internal.protocol.state.exception.ConnectionStateException; | ||
|
||
public interface ProtobufOperationHandler<Req, Resp> extends | ||
OperationHandler<Req, Resp, ClientProtocol.ErrorResponse, ProtobufSerializationService> { | ||
@Override | ||
Result<Resp, ClientProtocol.ErrorResponse> process( | ||
ProtobufSerializationService serializationService, Req request, | ||
MessageExecutionContext messageExecutionContext) | ||
throws InvalidExecutionContextException, ConnectionStateException; | ||
} |
Oops, something went wrong.