-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor proto services. More descriptive names + add packages for ea…
…ch service + helper classes for proto<->pojo conversions Signed-off-by: Finn Carroll <carrofin@amazon.com>
- Loading branch information
1 parent
a724b5e
commit bbabecd
Showing
12 changed files
with
359 additions
and
622 deletions.
There are no files selected for viewing
88 changes: 0 additions & 88 deletions
88
server/src/main/java/org/opensearch/grpc/services/DocumentServiceImpl.java
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
server/src/main/java/org/opensearch/grpc/services/document/DocumentServiceImpl.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,57 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.grpc.services.document; | ||
|
||
import io.grpc.stub.StreamObserver; | ||
import opensearch.proto.BulkRequest; | ||
import opensearch.proto.BulkResponse; | ||
import opensearch.proto.CreateOperation; | ||
import opensearch.proto.DeleteOperation; | ||
import opensearch.proto.IndexOperation; | ||
import opensearch.proto.ResponseItem; | ||
import opensearch.proto.UpdateOperation; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.opensearch.client.node.NodeClient; | ||
|
||
import opensearch.proto.services.DocumentServiceGrpc; | ||
|
||
public class DocumentServiceImpl extends DocumentServiceGrpc.DocumentServiceImplBase { | ||
private static final Logger logger = LogManager.getLogger(DocumentServiceImpl.class); | ||
private final NodeClient client; | ||
|
||
public DocumentServiceImpl(NodeClient client) { | ||
this.client = client; | ||
} | ||
|
||
@Override | ||
public void bulk(BulkRequest request, StreamObserver<BulkResponse> responseObserver) { | ||
super.bulk(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void index(IndexOperation request, StreamObserver<ResponseItem> responseObserver) { | ||
super.index(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void create(CreateOperation request, StreamObserver<ResponseItem> responseObserver) { | ||
super.create(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void update(UpdateOperation request, StreamObserver<ResponseItem> responseObserver) { | ||
super.update(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void delete(DeleteOperation request, StreamObserver<ResponseItem> responseObserver) { | ||
super.delete(request, responseObserver); | ||
} | ||
} |
Oops, something went wrong.