C# 클래스 Grpc.Core.GrpcEnvironment

Encapsulates initialization and shutdown of gRPC library.
파일 보기 프로젝트 열기: endlessm/chromium-browser 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddRef GrpcEnvironment
GetCompletionQueueCountOrDefault int
GetCoreVersionString string
GetRefCount int
GetThreadPoolSizeOrDefault int
GrpcEnvironment System
GrpcNativeInit void
GrpcNativeShutdown void
PickCompletionQueue Grpc.Core.Internal.CompletionQueueSafeHandle
RegisterChannel void
RegisterServer void
ReleaseAsync Task
ShutdownAsync Task
UnregisterChannel void
UnregisterServer void

공개 메소드들

메소드 설명
KillServersAsync ( ) : Task

Requests immediate shutdown of all servers created by the current process.

SetCompletionQueueCount ( int completionQueueCount ) : void

Sets the number of completion queues in the gRPC thread pool that polls for internal RPC events. Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. Setting the number of completions queues is an advanced setting and you should only use it if you know what you are doing. Most users should rely on the default value provided by gRPC library. Note: this method is part of an experimental API that can change or be removed without any prior notice.

SetLogger ( ILogger customLogger ) : void

Sets the application-wide logger that should be used by gRPC.

SetThreadPoolSize ( int threadCount ) : void

Sets the number of threads in the gRPC thread pool that polls for internal RPC events. Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. Setting thread pool size is an advanced setting and you should only use it if you know what you are doing. Most users should rely on the default value provided by gRPC library. Note: this method is part of an experimental API that can change or be removed without any prior notice.

ShutdownChannelsAsync ( ) : Task

Requests shutdown of all channels created by the current process.

비공개 메소드들

메소드 설명
AddRef ( ) : GrpcEnvironment

Returns a reference-counted instance of initialized gRPC environment. Subsequent invocations return the same instance unless reference count has dropped to zero previously.

GetCompletionQueueCountOrDefault ( ) : int
GetCoreVersionString ( ) : string

Gets version of gRPC C core.

GetRefCount ( ) : int
GetThreadPoolSizeOrDefault ( ) : int
GrpcEnvironment ( ) : System

Creates gRPC environment.

GrpcNativeInit ( ) : void
GrpcNativeShutdown ( ) : void
PickCompletionQueue ( ) : CompletionQueueSafeHandle

Picks a completion queue in a round-robin fashion. Shouldn't be invoked on a per-call basis (used at per-channel basis).

RegisterChannel ( Grpc.Core.Channel channel ) : void
RegisterServer ( Grpc.Core.Server server ) : void
ReleaseAsync ( ) : Task

Decrements the reference count for currently active environment and asynchronously shuts down the gRPC environment if reference count drops to zero.

ShutdownAsync ( ) : Task

Shuts down this environment.

UnregisterChannel ( Grpc.Core.Channel channel ) : void
UnregisterServer ( Grpc.Core.Server server ) : void

메소드 상세

KillServersAsync() 공개 정적인 메소드

Requests immediate shutdown of all servers created by the current process.
public static KillServersAsync ( ) : Task
리턴 Task

SetCompletionQueueCount() 공개 정적인 메소드

Sets the number of completion queues in the gRPC thread pool that polls for internal RPC events. Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. Setting the number of completions queues is an advanced setting and you should only use it if you know what you are doing. Most users should rely on the default value provided by gRPC library. Note: this method is part of an experimental API that can change or be removed without any prior notice.
public static SetCompletionQueueCount ( int completionQueueCount ) : void
completionQueueCount int
리턴 void

SetLogger() 공개 정적인 메소드

Sets the application-wide logger that should be used by gRPC.
public static SetLogger ( ILogger customLogger ) : void
customLogger ILogger
리턴 void

SetThreadPoolSize() 공개 정적인 메소드

Sets the number of threads in the gRPC thread pool that polls for internal RPC events. Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. Setting thread pool size is an advanced setting and you should only use it if you know what you are doing. Most users should rely on the default value provided by gRPC library. Note: this method is part of an experimental API that can change or be removed without any prior notice.
public static SetThreadPoolSize ( int threadCount ) : void
threadCount int
리턴 void

ShutdownChannelsAsync() 공개 정적인 메소드

Requests shutdown of all channels created by the current process.
public static ShutdownChannelsAsync ( ) : Task
리턴 Task