ep.setThreadPriority(threadPriority);
setAttribute("threadPriority", "" + threadPriority);
}
+
+ public void setAcceptorThreadPriority(int threadPriority) {
+ ep.setAcceptorThreadPriority(threadPriority);
+ setAttribute("acceptorThreadPriority", "" + threadPriority);
+ }
+
+ public void setPollerThreadPriority(int threadPriority) {
+ ep.setPollerThreadPriority(threadPriority);
+ setAttribute("pollerThreadPriority", "" + threadPriority);
+ }
public int getThreadPriority() {
return ep.getThreadPriority();
}
+ public int getAcceptorThreadPriority() {
+ return ep.getAcceptorThreadPriority();
+ }
+
+ public int getPollerThreadPriority() {
+ return ep.getThreadPriority();
+ }
+
+
// -------------------- Tcp setup --------------------
public int getBacklog() {
public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session";
public static final int OP_REGISTER = -1; //register interest op
+
// ----------------------------------------------------------------- Fields
/**
- * Priority of the acceptor and poller threads.
+ * Priority of the worker threads.
*/
protected int threadPriority = Thread.NORM_PRIORITY;
public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; }
public int getThreadPriority() { return threadPriority; }
+ /**
+ * Priority of the acceptor threads.
+ */
+ protected int acceptorThreadPriority = Thread.NORM_PRIORITY;
+ public void setAcceptorThreadPriority(int acceptorThreadPriority) { this.acceptorThreadPriority = acceptorThreadPriority; }
+ public int getAcceptorThreadPriority() { return acceptorThreadPriority; }
+
+ /**
+ * Priority of the poller threads.
+ */
+ protected int pollerThreadPriority = Thread.NORM_PRIORITY;
+ public void setPollerThreadPriority(int pollerThreadPriority) { this.pollerThreadPriority = pollerThreadPriority; }
+ public int getPollerThreadPriority() { return pollerThreadPriority; }
/**
* Server socket port.
<p>The number of threads to be used to run for the polling events. Default value is 1.
Can't see a reason to go above that. But experiment and find your own results.</p>
</attribute>
+ <attribute name="pollerThreadPriority" required="false">
+ <p>The priority of the poller threads.
+ The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
+ See the JavaDoc for the java.lang.Thread class for more details on
+ what this priority means.
+ </p>
+ </attribute>
+ <attribute name="acceptorThreadPriority" required="false">
+ <p>The priority of the acceptor threads. The threads used to accept new connections.
+ The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
+ See the JavaDoc for the java.lang.Thread class for more details on
+ what this priority means.
+ </p>
+ </attribute>
+
<attribute name="selectorTimeout" required="false">
<p>The time in milliseconds to timeout on a select() for the poller.
This value is important, since connection clean up is done on the same thread, so dont set this