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 defaultGrpcAcceptorController
implementation.- Since:
- 22.06.2
- Author:
- Jonathan Knight 2022.08.25
-
-
Constructor Summary
Constructors Constructor Description DefaultGrpcAcceptorController()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configure(io.grpc.ServerBuilder<?> serverBuilder, io.grpc.inprocess.InProcessServerBuilder inProcessServerBuilder)
static List<BindableGrpcProxyService>
createGrpcServices()
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)
List<BindableGrpcProxyService>
getBindableServices()
Return the list of services this controller is serving.com.tangosol.internal.net.service.peer.acceptor.GrpcAcceptorDependencies
getDependencies()
Returns thegRPC acceptor dependencies
.String
getInProcessName()
Return the name of the in-process gRPC server.String
getLocalAddress()
Return the address that the gRPC server is listening on.int
getLocalPort()
Return the port that the gRPC server is listening on.boolean
isRunning()
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.
-
-
-
Method Detail
-
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
public String 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
public String 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
public List<BindableGrpcProxyService> 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
public static List<BindableGrpcProxyService> 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)
-
-