Skip to content

Commit

Permalink
Added a javadoc, remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakn7 committed Oct 2, 2024
1 parent 81d0a93 commit 5526e62
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.google.protobuf.GeneratedMessageV3;
import com.yelp.nrtsearch.server.grpc.AddDocumentRequest;
import com.yelp.nrtsearch.server.grpc.LuceneServerStubBuilder;
import com.yelp.nrtsearch.server.grpc.ReplicationServerClient;
import com.yelp.nrtsearch.server.luceneserver.GlobalState;
import io.grpc.stub.ServerCallStreamObserver;
import io.grpc.stub.StreamObserver;
Expand All @@ -27,7 +26,11 @@

/**
* Abstract class for handlers that process requests and produce responses or provide a handler for
* streaming responses
* streaming responses. For a gRPC method x, create a class xHandler that extends Handler. Override
* the {@link #handle(StreamObserver)} method for streaming responses, or the {@link
* #handle(GeneratedMessageV3, StreamObserver)} method for unary responses. Initialize the handler
* in {@link com.yelp.nrtsearch.server.grpc.LuceneServer.LuceneServerImpl} and call the appropriate
* method on the handler in the gRPC call.
*
* @param <T> Request type
* @param <S> Response type
Expand All @@ -45,10 +48,6 @@ protected GlobalState getGlobalState() {
return globalState;
}

protected boolean isValidMagicHeader(int magicHeader) {
return magicHeader == ReplicationServerClient.BINARY_MAGIC;
}

public void handle(T protoRequest, StreamObserver<S> responseObserver) {
throw new UnsupportedOperationException("This method is not supported");
}
Expand Down

0 comments on commit 5526e62

Please sign in to comment.