diff options
author | Muxi Yan <mxyan@google.com> | 2018-10-17 16:59:00 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-10-17 16:59:00 -0700 |
commit | 8fef0c87893ceda1c5bb7aaa09ddb8dfaefacbdb (patch) | |
tree | 12c9bc7775d2c8544acafafd4671abd22efdc75d /src/objective-c/GRPCClient/private/GRPCChannelPool.h | |
parent | 86ff72bb4736cb9333505baeb324386cfa24bcb9 (diff) |
Rewrite the channel pool
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCChannelPool.h')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCChannelPool.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCChannelPool.h b/src/objective-c/GRPCClient/private/GRPCChannelPool.h index 48c35eacb0..bd1350c15d 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannelPool.h +++ b/src/objective-c/GRPCClient/private/GRPCChannelPool.h @@ -49,20 +49,20 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init; -- (instancetype)initWithChannelDestroyDelay:(NSTimeInterval)channelDestroyDelay NS_DESIGNATED_INITIALIZER; - /** * Return a channel with a particular configuration. If the channel does not exist, execute \a * createChannel then add it in the pool. If the channel exists, increase its reference count. */ -- (GRPCChannel *)channelWithConfiguration:(GRPCChannelConfiguration *)configuration - createChannelCallback:(GRPCChannel * (^)(void))createChannelCallback; +- (GRPCChannel *)channelWithConfiguration:(GRPCChannelConfiguration *)configuration; -/** Decrease a channel's refcount. */ -- (void)unrefChannelWithConfiguration:configuration; +/** Remove a channel with particular configuration. */ +- (void)removeChannelWithConfiguration:(GRPCChannelConfiguration *)configuration; /** Clear all channels in the pool. */ -- (void)clear; +- (void)removeAllChannels; + +/** Clear all channels in the pool and destroy the channels. */ +- (void)removeAndCloseAllChannels; @end |