Package org.ldaptive.transport.netty
Class SingletonTransport
- java.lang.Object
-
- org.ldaptive.transport.netty.NettyConnectionFactoryTransport
-
- org.ldaptive.transport.netty.SingletonTransport
-
- All Implemented Interfaces:
Transport
public class SingletonTransport extends NettyConnectionFactoryTransport
Creates netty connections using a single, sharedEventLoopGroup
using the best fit event loop group based on the operating system. SeeEpoll.isAvailable()
andKQueue.isAvailable()
. This event loop group uses daemon threads and does not expect to be shutdown, however it can be manually shutdown usingshutdown()
.
-
-
Field Summary
Fields Modifier and Type Field Description private static io.netty.channel.EventLoopGroup
SHARED_WORKER_GROUP
Event group used for all connections .-
Fields inherited from class org.ldaptive.transport.netty.NettyConnectionFactoryTransport
logger
-
-
Constructor Summary
Constructors Constructor Description SingletonTransport()
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Free any resources associated with this transport.static void
shutdown()
InvokesNettyUtils.shutdownGracefully(EventLoopGroup)
on the underlying worker group.-
Methods inherited from class org.ldaptive.transport.netty.NettyConnectionFactoryTransport
create, setShutdownOnClose, toString
-
-
-
-
Method Detail
-
close
public void close()
Description copied from interface:Transport
Free any resources associated with this transport.- Specified by:
close
in interfaceTransport
- Overrides:
close
in classNettyConnectionFactoryTransport
-
shutdown
public static void shutdown()
InvokesNettyUtils.shutdownGracefully(EventLoopGroup)
on the underlying worker group.
-
-