Package org.sonews.daemon.io
Klasse PlatformThreadedNNTPDaemon
java.lang.Object
org.sonews.daemon.DaemonRunner
org.sonews.daemon.io.ThreadedNNTPDaemon
org.sonews.daemon.io.PlatformThreadedNNTPDaemon
- Alle implementierten Schnittstellen:
Runnable,DaemonRunnable,NNTPDaemonRunnable
An NNTP daemon listening for incoming connections. This implementation of
NNTPDaemonRunnable uses a dynamically growing and shrinking pool of platform
threads to handle the incoming connections. The number of threads is between
min(4, 2*CPU-Cores) to min(128, 20*CPU_Cores). Due to the hard upper limit
this effectively limits the maximum number of connections that can be
processed in parallel. If there are more than 128 (or 20*CPU_Cores) incoming
connections, new connections will be rejected.
Due to this limitations the VirtualThreadedNNTPDaemon is the better choice
in almost any situation.
- Autor:
- Christian Lins
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate final BlockingQueue<Runnable> private final org.slf4j.Loggerprivate final intprivate final intVon Klasse geerbte Felder org.sonews.daemon.io.ThreadedNNTPDaemon
context, port, serverSocket, threadPoolVon Klasse geerbte Felder org.sonews.daemon.DaemonRunner
daemon -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidrun()Opens a server socket on the configured port and waits for incoming connections.Von Klasse geerbte Methoden org.sonews.daemon.io.ThreadedNNTPDaemon
dispose, setPortVon Klasse geerbte Methoden org.sonews.daemon.DaemonRunner
setDaemonVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.sonews.daemon.DaemonRunnable
setDaemon
-
Felddetails
-
log
private final org.slf4j.Logger log -
numMinThreads
private final int numMinThreads -
numMaxThreads
private final int numMaxThreads -
connQueue
-
-
Konstruktordetails
-
PlatformThreadedNNTPDaemon
public PlatformThreadedNNTPDaemon()
-
-
Methodendetails
-
run
public void run()Opens a server socket on the configured port and waits for incoming connections.
-