Package pt.unl.fct.di.novasys.network
Class NetworkManager<T>
java.lang.Object
pt.unl.fct.di.novasys.network.NetworkManager<T>
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkManager
(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout) Creates a new instanceNetworkManager
(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout, int nWorkerThreads) NetworkManager
(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout, io.netty.channel.EventLoopGroup workerGroup) -
Method Summary
Modifier and TypeMethodDescriptioncreateConnection
(Host peer, Attributes attrs, OutConnListener<T> listener) static io.netty.channel.EventLoopGroup
Creates a newEventLoopGroup
using the default number of threads (number of cpus * 2).static io.netty.channel.EventLoopGroup
createNewWorkerGroup
(int nThreads) Creates a newEventLoopGroup
using the specified number of threads.void
createServerSocket
(InConnListener<T> l, Host addr, AttributeValidator v) void
createServerSocket
(InConnListener<T> l, Host addr, AttributeValidator v, int childThreads) void
createServerSocket
(InConnListener<T> l, Host addr, AttributeValidator v, int childThreads, int parentThreads) void
createServerSocket
(InConnListener<T> l, Host addr, AttributeValidator v, io.netty.channel.EventLoopGroup childGroup) void
createServerSocket
(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v) void
createServerSocket
(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, int childThreads) void
createServerSocket
(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, int childThreads, int parentThreads) void
createServerSocket
(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, io.netty.channel.EventLoopGroup childGroup) void
createServerSocket
(InConnListener<T> listener, Host listenAddr, Attributes attrs, AttributeValidator validator, io.netty.channel.EventLoopGroup childGroup, io.netty.channel.EventLoopGroup parentGroup)
-
Constructor Details
-
NetworkManager
public NetworkManager(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout) Creates a new instance -
NetworkManager
public NetworkManager(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout, int nWorkerThreads) -
NetworkManager
public NetworkManager(ISerializer<T> serializer, MessageListener<T> consumer, int hbInterval, int hbTolerance, int connectTimeout, io.netty.channel.EventLoopGroup workerGroup)
-
-
Method Details
-
createConnection
-
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, AttributeValidator v, int childThreads) -
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, int childThreads) -
createServerSocket
-
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v) -
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, AttributeValidator v, int childThreads, int parentThreads) -
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, int childThreads, int parentThreads) -
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, AttributeValidator v, io.netty.channel.EventLoopGroup childGroup) -
createServerSocket
public void createServerSocket(InConnListener<T> l, Host addr, Attributes attr, AttributeValidator v, io.netty.channel.EventLoopGroup childGroup) -
createServerSocket
public void createServerSocket(InConnListener<T> listener, Host listenAddr, Attributes attrs, AttributeValidator validator, io.netty.channel.EventLoopGroup childGroup, io.netty.channel.EventLoopGroup parentGroup) -
createNewWorkerGroup
public static io.netty.channel.EventLoopGroup createNewWorkerGroup(int nThreads) Creates a newEventLoopGroup
using the specified number of threads. -
createNewWorkerGroup
public static io.netty.channel.EventLoopGroup createNewWorkerGroup()Creates a newEventLoopGroup
using the default number of threads (number of cpus * 2).
-