public class NettyPoolableFactory extends Object implements org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>
| Constructor and Description |
|---|
NettyPoolableFactory(AbstractNettyRemotingClient rpcRemotingClient,
NettyClientBootstrap clientBootstrap)
Instantiates a new Netty key poolable factory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(NettyPoolKey key,
io.netty.channel.Channel obj) |
void |
destroyObject(NettyPoolKey key,
io.netty.channel.Channel channel) |
io.netty.channel.Channel |
makeObject(NettyPoolKey key) |
void |
passivateObject(NettyPoolKey key,
io.netty.channel.Channel obj) |
boolean |
validateObject(NettyPoolKey key,
io.netty.channel.Channel obj) |
public NettyPoolableFactory(AbstractNettyRemotingClient rpcRemotingClient, NettyClientBootstrap clientBootstrap)
rpcRemotingClient - the rpc remoting clientpublic io.netty.channel.Channel makeObject(NettyPoolKey key)
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>public void destroyObject(NettyPoolKey key, io.netty.channel.Channel channel) throws Exception
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>Exceptionpublic boolean validateObject(NettyPoolKey key, io.netty.channel.Channel obj)
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>public void activateObject(NettyPoolKey key, io.netty.channel.Channel obj) throws Exception
activateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>Exceptionpublic void passivateObject(NettyPoolKey key, io.netty.channel.Channel obj) throws Exception
passivateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory<NettyPoolKey,io.netty.channel.Channel>ExceptionCopyright © 2023 Seata. All rights reserved.