Package com.oracle.coherence.grpc.proxy
Class DefaultGrpcAcceptorController
java.lang.Object
com.oracle.coherence.grpc.proxy.DefaultGrpcAcceptorController
- All Implemented Interfaces:
com.tangosol.net.grpc.GrpcAcceptorController
public class DefaultGrpcAcceptorController
extends Object
implements com.tangosol.net.grpc.GrpcAcceptorController
The default
GrpcAcceptorController
implementation.- Since:
- 22.06.2
- Author:
- Jonathan Knight 2022.08.25
-
Field Summary
Fields inherited from interface com.tangosol.net.grpc.GrpcAcceptorController
NULL_CONTROLLER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configure
(io.grpc.ServerBuilder<?> serverBuilder, io.grpc.inprocess.InProcessServerBuilder inProcessServerBuilder) static List
<BindableGrpcProxyService> Obtain the list of gRPC proxy services to bind to a gRPC server.static List
<BindableGrpcProxyService> createGrpcServices
(GrpcServiceDependencies depsService) Obtain the list of gRPC proxy services to bind to a gRPC server.protected io.grpc.inprocess.InProcessServerBuilder
createInProcessServerBuilder
(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) protected io.grpc.ServerBuilder
<?> createServerBuilder
(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) Return the list of services this controller is serving.com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies
Returns thegRPC acceptor dependencies
.Return the name of the in-process gRPC server.Return the address that the gRPC server is listening on.int
Return the port that the gRPC server is listening on.boolean
Returnstrue
if the gRPC server is running.void
setDaemonPool
(com.tangosol.internal.util.DaemonPool pool) Set theDaemonPool
to be used.void
setDependencies
(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) Set theGrpcAcceptorDependencies
.void
start()
Start the gRPC server.void
stop()
Stop the gRPC server.
-
Constructor Details
-
DefaultGrpcAcceptorController
public DefaultGrpcAcceptorController()
-
-
Method Details
-
setDependencies
public void setDependencies(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Set theGrpcAcceptorDependencies
.- Specified by:
setDependencies
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Parameters:
deps
- theGrpcAcceptorDependencies
-
getDependencies
public com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies getDependencies()Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Returns thegRPC acceptor dependencies
.- Specified by:
getDependencies
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Returns:
- the
gRPC acceptor dependencies
-
setDaemonPool
public void setDaemonPool(com.tangosol.internal.util.DaemonPool pool) Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Set theDaemonPool
to be used.- Specified by:
setDaemonPool
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Parameters:
pool
- theDaemonPool
to be used
-
start
public void start()Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Start the gRPC server.- Specified by:
start
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
-
stop
public void stop()Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Stop the gRPC server.- Specified by:
stop
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
-
isRunning
public boolean isRunning()Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Returnstrue
if the gRPC server is running.- Specified by:
isRunning
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Returns:
true
if the gRPC server is running
-
getLocalAddress
Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Return the address that the gRPC server is listening on.- Specified by:
getLocalAddress
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Returns:
- the address that the gRPC server is listening on
-
getLocalPort
public int getLocalPort()Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Return the port that the gRPC server is listening on.- Specified by:
getLocalPort
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Returns:
- the port that the gRPC server is listening on
-
getInProcessName
Description copied from interface:com.tangosol.net.grpc.GrpcAcceptorController
Return the name of the in-process gRPC server.- Specified by:
getInProcessName
in interfacecom.tangosol.net.grpc.GrpcAcceptorController
- Returns:
- the name of the in-process gRPC server
-
getBindableServices
Return the list of services this controller is serving.- Returns:
- the list of services this controller is serving
-
createServerBuilder
protected io.grpc.ServerBuilder<?> createServerBuilder(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) -
createInProcessServerBuilder
protected io.grpc.inprocess.InProcessServerBuilder createInProcessServerBuilder(com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies deps) -
createGrpcServices
Obtain the list of gRPC proxy services to bind to a gRPC server.- Returns:
- the list of gRPC proxy services to bind to a gRPC server
-
createGrpcServices
public static List<BindableGrpcProxyService> createGrpcServices(GrpcServiceDependencies depsService) Obtain the list of gRPC proxy services to bind to a gRPC server.- Parameters:
depsService
- theGrpcServiceDependencies
to use- Returns:
- the list of gRPC proxy services to bind to a gRPC server
-
configure
protected void configure(io.grpc.ServerBuilder<?> serverBuilder, io.grpc.inprocess.InProcessServerBuilder inProcessServerBuilder)
-