Interface GrpcServiceProtocol<Req extends com.google.protobuf.Message, Resp extends com.google.protobuf.Message>
- Type Parameters:
Req- the type of the request messagesResp- the type of the response messages
- All Known Subinterfaces:
NamedCacheProtocol<Req,,Resp> NamedQueueProtocol<Req,,Resp> NamedTopicProtocol<Req,Resp>
- All Known Implementing Classes:
BaseCacheServiceProxyProtocol,BaseExtendProxyProtocol,BaseProxyProtocol,NamedCacheProxyProtocol,NamedQueueProxyProtocol,NamedTopicProxyProtocol
public interface GrpcServiceProtocol<Req extends com.google.protobuf.Message, Resp extends com.google.protobuf.Message>
A Coherence gRPC message protocol.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this protocol.com.tangosol.net.messaging.Protocol[]Return the Extend messaging protocol that corresponds to this gRPC protocol.default longgetObserverId(long nId, Resp request) Return the observer identifier for a request.default intReturn the priority for this protocol.Return the name of this protocol.Return the type of the request messages.Return the type of the response messages.Return theSerializerto use to serialize response data.intReturn the minimum version of the protocol this instance supports.intReturn the version of the protocol.voidinit(GrpcService service, com.oracle.coherence.grpc.messages.proxy.v1.InitRequest request, int nVersion, UUID clientUUID, io.grpc.stub.StreamObserver<Resp> observer, com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.grpcAcceptor.GrpcConnection<Resp> connection) Initialise this protocol.default voidHandle an error.voidHandle a request.
-
Field Details
-
PRIORITY_NORMAL
static final int PRIORITY_NORMALThe default normal priority.- See Also:
-
-
Method Details
-
getPriority
default int getPriority()Return the priority for this protocol.- Returns:
- the priority for this protocol
-
getProtocol
-
getVersion
int getVersion()Return the version of the protocol.- Returns:
- the version of the protocol
-
getSupportedVersion
int getSupportedVersion()Return the minimum version of the protocol this instance supports.- Returns:
- the minimum version of the protocol this instance supports
-
getRequestType
-
getResponseType
-
getSerializer
Serializer getSerializer()Return theSerializerto use to serialize response data.- Returns:
- the
Serializerto use to serialize response data
-
init
void init(GrpcService service, com.oracle.coherence.grpc.messages.proxy.v1.InitRequest request, int nVersion, UUID clientUUID, io.grpc.stub.StreamObserver<Resp> observer, com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.grpcAcceptor.GrpcConnection<Resp> connection) Initialise this protocol.- Parameters:
service- the parentGrpcServicerequest- the init request to use to initialise the protocolnVersion- the actual version of the protocol to useclientUUID- the clientUUIDobserver- theStreamObserverto send non-request related responses (e.g. events)connection- theGrpcConnection
-
onRequest
-
close
void close()Close this protocol. -
onError
-
getExtendProtocols
com.tangosol.net.messaging.Protocol[] getExtendProtocols()Return the Extend messaging protocol that corresponds to this gRPC protocol.- Returns:
- the Extend messaging protocol that corresponds to this gRPC protocol
-
getObserverId
Return the observer identifier for a request.- Parameters:
nId- the request identifierrequest- the request
-