This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 862c4d2  GEODE-3995: Moving server_api.proto to locator_api.proto.
862c4d2 is described below

commit 862c4d245943ae54ef6fc170798670191cc6b492
Author: Bruce Schuchardt <[email protected]>
AuthorDate: Mon Nov 20 13:46:00 2017 -0800

    GEODE-3995: Moving server_api.proto to locator_api.proto.
    
    This closes PR #1074
---
 .../v1/operations/GetAvailableServersOperationHandler.java   | 12 ++++++------
 .../protobuf/v1/utilities/ProtobufRequestUtilities.java      |  8 ++++----
 geode-protobuf/src/main/proto/v1/clientProtocol.proto        |  2 +-
 .../main/proto/v1/{server_API.proto => locator_API.proto}    |  0
 .../protobuf/v1/acceptance/LocatorConnectionDUnitTest.java   |  4 ++--
 .../GetAvailableServersOperationHandlerJUnitTest.java        | 10 +++++-----
 6 files changed, 18 insertions(+), 18 deletions(-)

diff --git 
a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
 
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
index 41343a8..c97b73b 100644
--- 
a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
+++ 
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandler.java
@@ -28,16 +28,16 @@ import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import org.apache.geode.internal.protocol.serialization.SerializationService;
 
 @Experimental
 public class GetAvailableServersOperationHandler implements
-    OperationHandler<ServerAPI.GetAvailableServersRequest, 
ServerAPI.GetAvailableServersResponse, ClientProtocol.ErrorResponse> {
+    OperationHandler<LocatorAPI.GetAvailableServersRequest, 
LocatorAPI.GetAvailableServersResponse, ClientProtocol.ErrorResponse> {
 
   @Override
-  public Result<ServerAPI.GetAvailableServersResponse, 
ClientProtocol.ErrorResponse> process(
-      SerializationService serializationService, 
ServerAPI.GetAvailableServersRequest request,
+  public Result<LocatorAPI.GetAvailableServersResponse, 
ClientProtocol.ErrorResponse> process(
+      SerializationService serializationService, 
LocatorAPI.GetAvailableServersRequest request,
       MessageExecutionContext messageExecutionContext) throws 
InvalidExecutionContextException {
 
     InternalLocator internalLocator = (InternalLocator) 
messageExecutionContext.getLocator();
@@ -50,8 +50,8 @@ public class GetAvailableServersOperationHandler implements
     Collection<BasicTypes.Server> servers = (Collection<BasicTypes.Server>) 
serversFromSnapshot
         .stream().map(serverLocation -> 
getServerProtobufMessage((ServerLocation) serverLocation))
         .collect(Collectors.toList());
-    ServerAPI.GetAvailableServersResponse.Builder builder =
-        
ServerAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
+    LocatorAPI.GetAvailableServersResponse.Builder builder =
+        
LocatorAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
     return Success.of(builder.build());
   }
 
diff --git 
a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
 
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
index d44fa0d..e1f7e6a 100644
--- 
a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
+++ 
b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/utilities/ProtobufRequestUtilities.java
@@ -19,8 +19,8 @@ import java.util.Set;
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import org.apache.geode.internal.protocol.protobuf.v1.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
 
 /**
  * This class contains helper functions for generating ClientProtocol.Request 
objects
@@ -110,9 +110,9 @@ public abstract class ProtobufRequestUtilities {
     return 
ClientProtocol.Request.newBuilder().setPutAllRequest(putAllRequestBuilder).build();
   }
 
-  public static ServerAPI.GetAvailableServersRequest 
createGetAvailableServersRequest() {
-    ServerAPI.GetAvailableServersRequest.Builder builder =
-        ServerAPI.GetAvailableServersRequest.newBuilder();
+  public static LocatorAPI.GetAvailableServersRequest 
createGetAvailableServersRequest() {
+    LocatorAPI.GetAvailableServersRequest.Builder builder =
+        LocatorAPI.GetAvailableServersRequest.newBuilder();
     return builder.build();
   }
 }
diff --git a/geode-protobuf/src/main/proto/v1/clientProtocol.proto 
b/geode-protobuf/src/main/proto/v1/clientProtocol.proto
index 95a0fdc..93be175 100644
--- a/geode-protobuf/src/main/proto/v1/clientProtocol.proto
+++ b/geode-protobuf/src/main/proto/v1/clientProtocol.proto
@@ -23,7 +23,7 @@ package org.apache.geode.internal.protocol.protobuf.v1;
 
 import "google/protobuf/any.proto";
 import "v1/region_API.proto";
-import "v1/server_API.proto";
+import "v1/locator_API.proto";
 import "v1/basicTypes.proto";
 import "v1/connection_API.proto";
 
diff --git a/geode-protobuf/src/main/proto/v1/server_API.proto 
b/geode-protobuf/src/main/proto/v1/locator_API.proto
similarity index 100%
rename from geode-protobuf/src/main/proto/v1/server_API.proto
rename to geode-protobuf/src/main/proto/v1/locator_API.proto
diff --git 
a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
 
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
index caa5609..ac432af 100644
--- 
a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
+++ 
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/acceptance/LocatorConnectionDUnitTest.java
@@ -40,7 +40,7 @@ import 
org.apache.geode.internal.protocol.exception.InvalidProtocolMessageExcept
 import 
org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
 import org.apache.geode.internal.protocol.protobuf.v1.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.v1.ConnectionAPI;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
 import 
org.apache.geode.internal.protocol.protobuf.v1.serializer.ProtobufProtocolSerializer;
 import 
org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufRequestUtilities;
 import 
org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufUtilities;
@@ -223,7 +223,7 @@ public class LocatorConnectionDUnitTest extends 
JUnit4CacheTestCase {
     ClientProtocol.Response messageResponse = 
getAvailableServersResponseMessage.getResponse();
     
assertEquals(ClientProtocol.Response.ResponseAPICase.GETAVAILABLESERVERSRESPONSE,
         messageResponse.getResponseAPICase());
-    ServerAPI.GetAvailableServersResponse getAvailableServersResponse =
+    LocatorAPI.GetAvailableServersResponse getAvailableServersResponse =
         messageResponse.getGetAvailableServersResponse();
     assertEquals(1, getAvailableServersResponse.getServersCount());
   }
diff --git 
a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
 
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
index 940bfca..a43c5fa 100644
--- 
a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
+++ 
b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/GetAvailableServersOperationHandlerJUnitTest.java
@@ -35,8 +35,8 @@ import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.TestExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.v1.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.v1.ServerAPI;
-import 
org.apache.geode.internal.protocol.protobuf.v1.ServerAPI.GetAvailableServersResponse;
+import org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI;
+import 
org.apache.geode.internal.protocol.protobuf.v1.LocatorAPI.GetAvailableServersResponse;
 import 
org.apache.geode.internal.protocol.protobuf.v1.utilities.ProtobufRequestUtilities;
 import org.apache.geode.test.junit.categories.UnitTest;
 
@@ -72,7 +72,7 @@ public class GetAvailableServersOperationHandlerJUnitTest 
extends OperationHandl
     serverList.add(new ServerLocation(HOSTNAME_2, PORT_2));
     when(locatorLoadSnapshot.getServers(null)).thenReturn(serverList);
 
-    ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
+    LocatorAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
     Result operationHandlerResult = 
getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
@@ -85,7 +85,7 @@ public class GetAvailableServersOperationHandlerJUnitTest 
extends OperationHandl
       throws InvalidExecutionContextException {
     when(locatorLoadSnapshot.getServers(any())).thenReturn(null);
 
-    ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
+    LocatorAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
     Result operationHandlerResult = 
getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
@@ -95,7 +95,7 @@ public class GetAvailableServersOperationHandlerJUnitTest 
extends OperationHandl
   }
 
   private Result getOperationHandlerResult(
-      ServerAPI.GetAvailableServersRequest getAvailableServersRequest)
+      LocatorAPI.GetAvailableServersRequest getAvailableServersRequest)
       throws InvalidExecutionContextException {
     return operationHandler.process(serializationServiceStub, 
getAvailableServersRequest,
         TestExecutionContext.getLocatorExecutionContext(internalLocatorMock));

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to