Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DB25B200CC6 for ; Tue, 18 Jul 2017 19:21:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D9B46167389; Tue, 18 Jul 2017 17:21:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 06B51167385 for ; Tue, 18 Jul 2017 19:21:40 +0200 (CEST) Received: (qmail 39031 invoked by uid 500); 18 Jul 2017 17:21:40 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 39017 invoked by uid 99); 18 Jul 2017 17:21:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2017 17:21:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 24CC1E96A3; Tue, 18 Jul 2017 17:21:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: udo@apache.org To: commits@geode.apache.org Date: Tue, 18 Jul 2017 17:21:41 -0000 Message-Id: <507f80c134cc4842955cd0607bd5a36b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/4] geode git commit: GEODE-3141: spotless reformatting archived-at: Tue, 18 Jul 2017 17:21:42 -0000 GEODE-3141: spotless reformatting Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/40e70f18 Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/40e70f18 Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/40e70f18 Branch: refs/heads/develop Commit: 40e70f18d3f7233cb7475edc2cc08f423dd9d422 Parents: 66468b1 Author: Udo Kohlmeyer Authored: Fri Jul 14 13:06:17 2017 -0700 Committer: Udo Kohlmeyer Committed: Tue Jul 18 10:20:31 2017 -0700 ---------------------------------------------------------------------- .../protobuf/utilities/ProtobufUtilities.java | 38 ++++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/40e70f18/geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufUtilities.java ---------------------------------------------------------------------- diff --git a/geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufUtilities.java b/geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufUtilities.java index 02afc88..0f2628c 100644 --- a/geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufUtilities.java +++ b/geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/utilities/ProtobufUtilities.java @@ -31,21 +31,22 @@ import org.apache.geode.serialization.registry.exception.CodecNotRegisteredForTy * mainly focused on helper functions which can be used in building BasicTypes for use in other * messages or those used to create the top level Message objects. * - * Helper functions specific to creating ClientProtocol.Responses can be found at {@link - * ProtobufResponseUtilities} Helper functions specific to creating ClientProtocol.Requests can be - * found at {@link ProtobufRequestUtilities} + * Helper functions specific to creating ClientProtocol.Responses can be found at + * {@link ProtobufResponseUtilities} Helper functions specific to creating ClientProtocol.Requests + * can be found at {@link ProtobufRequestUtilities} */ public abstract class ProtobufUtilities { /** * Creates a object containing the type and value encoding of a piece of data + * * @param serializationService - object which knows how to encode objects for the protobuf - * protocol {@link ProtobufSerializationService} + * protocol {@link ProtobufSerializationService} * @param unencodedValue - the value object which is to be encoded * @return a protobuf EncodedValue object * @throws UnsupportedEncodingTypeException - The object passed doesn't have a corresponding - * SerializationType + * SerializationType * @throws CodecNotRegisteredForTypeException - There isn't a protobuf codec for the - * SerializationType of the passed object + * SerializationType of the passed object */ public static BasicTypes.EncodedValue createEncodedValue( SerializationService serializationService, Object unencodedValue) @@ -59,29 +60,31 @@ public abstract class ProtobufUtilities { /** * Creates a protobuf key,value pair from an encoded key and value + * * @param key - an EncodedValue containing the key of the entry * @param value - an EncodedValue containing the value of the entry * @return a protobuf Entry object containing the passed key and value */ public static BasicTypes.Entry createEntry(BasicTypes.EncodedValue key, - BasicTypes.EncodedValue value) { + BasicTypes.EncodedValue value) { return BasicTypes.Entry.newBuilder().setKey(key).setValue(value).build(); } /** * Creates a protobuf key,value pair from unencoded data + * * @param serializationService - object which knows how to encode objects for the protobuf - * protocol {@link ProtobufSerializationService} + * protocol {@link ProtobufSerializationService} * @param unencodedKey - the unencoded key for the entry * @param unencodedValue - the unencoded value for the entry * @return a protobuf Entry containing the encoded key and value * @throws UnsupportedEncodingTypeException - The key or value passed doesn't have a corresponding - * SerializationType + * SerializationType * @throws CodecNotRegisteredForTypeException - There isn't a protobuf codec for the - * SerializationType of the passed key or value + * SerializationType of the passed key or value */ public static BasicTypes.Entry createEntry(SerializationService serializationService, - Object unencodedKey, Object unencodedValue) + Object unencodedKey, Object unencodedValue) throws UnsupportedEncodingTypeException, CodecNotRegisteredForTypeException { return createEntry(createEncodedValue(serializationService, unencodedKey), createEncodedValue(serializationService, unencodedValue)); @@ -89,6 +92,7 @@ public abstract class ProtobufUtilities { /** * This creates a protobuf message containing a ClientProtocol.Response + * * @param messageHeader - The header for the message * @param response - The response for the message * @return a protobuf Message containing the above parameters @@ -101,6 +105,7 @@ public abstract class ProtobufUtilities { /** * This creates a protobuf message containing a ClientProtocol.Request + * * @param messageHeader - The header for the message * @param request - The request for the message * @return a protobuf Message containing the above parameters @@ -113,6 +118,7 @@ public abstract class ProtobufUtilities { /** * This builds the MessageHeader for a response which matches an incoming request + * * @param request - The request message that we're responding to. * @return the MessageHeader the response to the passed request */ @@ -123,6 +129,7 @@ public abstract class ProtobufUtilities { /** * This creates a MessageHeader + * * @param correlationId - An identifier used to correlate requests and responses * @return a MessageHeader containing the above parameters */ @@ -132,17 +139,18 @@ public abstract class ProtobufUtilities { /** * This will return the object encoded in a protobuf EncodedValue + * * @param serializationService - object which knows how to encode objects for the protobuf - * protocol {@link ProtobufSerializationService} + * protocol {@link ProtobufSerializationService} * @param encodedValue - The value to be decoded * @return the object encoded in the passed encodedValue * @throws UnsupportedEncodingTypeException - There isn't a SerializationType matching the - * encodedValues type + * encodedValues type * @throws CodecNotRegisteredForTypeException - There isn't a protobuf codec for the - * SerializationType matching the encodedValues type + * SerializationType matching the encodedValues type */ public static Object decodeValue(SerializationService serializationService, - BasicTypes.EncodedValue encodedValue) + BasicTypes.EncodedValue encodedValue) throws UnsupportedEncodingTypeException, CodecNotRegisteredForTypeException { BasicTypes.EncodingType encoding = encodedValue.getEncodingType(); byte[] bytes = encodedValue.getValue().toByteArray();