950 Commits

Author SHA1 Message Date
Simone Bordet
8d2efaf7eb 445167 - Allow configuration of dispatch after select.
Introduced parameter "dispatchIO" in the relevant factories so that
they can be configured by users and connections will be created
taking into account this parameter.

For less configurable connection factories, this parameter is
currently hardcoded to either true or false depending on the case.
For example, ALPN and NPN connections have it to false, since they
don't do any blocking operation in onFillable().
2014-09-26 10:13:16 +02:00
Greg Wilkins
2018098225 Merge remote-tracking branch 'origin/jetty-9.2.x'
Conflicts:
	jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
2014-09-18 16:36:51 +10:00
Greg Wilkins
3b066ca2ae 444415 iterative WriteFlusher 2014-09-18 15:31:59 +10:00
Simone Bordet
193eaaf1c3 SelectChannelEndPoint should set the interestOps as requested.
Previously, SCEP was skipping the update of the interestOps in case it
was either input or output shutdown.

Now it always set the interestOps as requested and leaves to the
connection decide what interestOps needs to be set.
2014-09-17 17:44:49 +02:00
Joakim Erdfelt
2755746def Merge branch 'jetty-http2' 2014-09-11 05:56:55 -07:00
Simone Bordet
fd1c9dd8d2 443713 - Reduce number of SelectionKey.setInterestOps() calls.
Introduced a state machine to handle the various scenarios (ST = selector thread, Tx = pooled thread):

ST: call to SCEP.onSelected() moves from SELECTING -> PENDING.
ST: call to SCEP.updateKey() moves from PENDING -> UPDATING -> SELECTING
T1: call to SCEP.changeInterests() moves (SELECTING | PENDING) -> CHANGING -> SELECTING

The race between ST and T1 to move from PENDING to either UPDATING or CHANGING will be won
by one thread only, which will then perform the call to SelectionKey.setInterestOps().
Preferably, this will be done by ST during an updateKey() call. If updateKey() has already
been invoked, then changeInterests() will perform the call to SelectionKey.setInterestOps().

However, if T1 loses, it still has to perform the key update, so it will spin until ST
moves back to SELECTING.
2014-09-10 21:45:27 +02:00
Simone Bordet
1ee11138a7 Introduced field "submitKeyUpdates" instead of relying on a system
property.

Modified method updateKey() to return a boolean to signal whether the
selector was woken up.
2014-09-10 11:11:12 +02:00
Simone Bordet
87cac64dff Fixed typo, improved logging, removed unused type parameter. 2014-09-10 11:11:12 +02:00
Greg Wilkins
40d84ff1e3 443662 Consume buffer in write(ByteBuffer) 2014-09-10 17:41:14 +10:00
Greg Wilkins
07ec47adfa improved SSL debug logging 2014-09-04 19:09:39 +10:00
Simone Bordet
ee3ab1f8ea Merged branch 'master' into 'jetty-http2'. 2014-09-01 11:57:09 +02:00
Simone Bordet
9dbd2cd9d8 442950 - Embedded Jetty client requests to localhost hangs with high cpu usage (NIO OP_CONNECT Solaris/Sparc).
Now checking the return value of SocketChannel.connect() to determine
whether to register the channel (true) or finish the connect (false).
2014-09-01 11:28:59 +02:00
Simone Bordet
ca2a23c35d Improved Javadocs and code cleanup. 2014-09-01 11:28:59 +02:00
Greg Wilkins
5507e267ae Merge remote-tracking branch 'origin/master' into jetty-http2
Conflicts:
	jetty-server/src/main/config/etc/jetty-https.xml
	jetty-server/src/main/config/modules/ssl.mod
	jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java
2014-08-29 15:49:25 +10:00
Greg Wilkins
69390954dc 435322 acceptor and selector configuration/priority 2014-08-29 15:36:19 +10:00
Greg Wilkins
23eba39748 Merge remote-tracking branch 'origin/master' into jetty-http2 2014-08-21 16:39:45 +10:00
Greg Wilkins
420df3b5d6 441756 Ssl Stackoverflow on renegotiate 2014-08-21 09:47:01 +10:00
Simone Bordet
1c984e680f Introduced the capability of inserting buffers at a specific index. 2014-08-04 12:12:19 +02:00
Simone Bordet
51e4885911 Made HTTP2Client support SSL so that it can be used to test websites that serve HTTP2. 2014-08-01 19:03:29 +02:00
Greg Wilkins
b439549793 Merge remote-tracking branch 'origin/master' into jetty-http2
Conflicts:
	jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
2014-08-01 09:50:20 +10:00
Greg Wilkins
f970ffc0ac Misc cleanups done whilst fixing 435322 2014-08-01 09:02:44 +10:00
Greg Wilkins
a537fefd6b Merge remote-tracking branch 'origin/master' into jetty-http2 2014-07-18 15:28:54 +10:00
Greg Wilkins
5c7f3e7c0d 432815 Fixed selector stop race 2014-07-18 12:05:32 +10:00
Greg Wilkins
5e281dd449 Merge remote-tracking branch 'origin/master' into jetty-http2
Conflicts:
	jetty-util/src/main/java/org/eclipse/jetty/util/IteratingCallback.java
2014-07-10 14:43:39 +10:00
Greg Wilkins
55ca09a00e 438190 findbug improvements 2014-07-10 14:41:32 +10:00
Greg Wilkins
6eceb6bd99 Merge remote-tracking branch 'origin/master' into jetty-http2 2014-06-29 08:11:41 +02:00
Greg Wilkins
9b764ef3fa 435322 Fixed Iterating Callback close 2014-06-27 20:43:12 +02:00
Simone Bordet
66f3913527 Merged branch 'origin/master' into 'jetty-http2'. 2014-06-25 12:34:19 +02:00
Simone Bordet
3ff4195dbc Guarded calls to LOG.debug() with if (LOG.isDebugEnabled()) to reduce allocation of varargs Object[]. 2014-06-25 12:26:45 +02:00
Simone Bordet
74bf0000c5 Removed Lease.merge() and cleared lists in recycle(). 2014-06-13 13:51:42 +02:00
Simone Bordet
7aeddff675 Changed method acquire() to not append(), to allow callers to decide
whether to append() or prepend the returned buffer.
2014-06-10 18:09:07 +02:00
Simone Bordet
1d2e9da29c Clearing the buffer before returning it. 2014-06-10 12:02:54 +02:00
Simone Bordet
bedfda03d2 Introduced Lease.prepend(). 2014-06-09 14:01:51 +02:00
Greg Wilkins
36081dbcbf reworked for metadata 2014-06-09 13:01:15 +02:00
Simone Bordet
244158ee3e Introduced class ByteBufferPool.Lease to keep track of buffers with
associated information of whether they have been borrowed from the
ByteBufferPool or not.
2014-06-06 16:24:09 +02:00
Greg Wilkins
2e261b75d6 433692 improved buffer resizing 2014-04-29 20:36:13 +02:00
Greg Wilkins
61b2e7f75e Improved failsafe close handling for half closed endpoints 2014-04-24 10:01:46 +02:00
Joakim Erdfelt
9f76856fcf EndPoint onIdleExpired should not close on its own
+ From discussion with Simone, the dispatched fillInterest.onFail()
  needs to occur, so that the AbstractConnection.onReadTimeout() can
  handle the close conditions needed by SPDY and WebSocket.
  The EndPoint close within onIdleExpired is a race condition with
  this onReadTimeout desired behavior.
2014-04-17 10:38:06 -07:00
Greg Wilkins
ef400675aa 431519 Fixed NetworkTrafficListener 2014-04-10 16:20:10 +10:00
Joakim Erdfelt
28d9df1dbb Refactoring alpn stuff into jetty-alpn-server and jetty-alpn-client 2014-03-31 14:18:37 -07:00
Greg Wilkins
c895f6dbcd organised imports 2014-03-31 09:57:59 +11:00
Simone Bordet
a7f9e5a674 Made test more reliable. 2014-03-28 19:34:03 +01:00
Simone Bordet
342c97d8ba 430654 - closing client connections can hang worker threads.
Prettified usage of NonBlockingThread and added Javadocs.
2014-03-27 15:37:23 +01:00
Greg Wilkins
86d13b91a5 430654 avoid dispatching failure callbacks 2014-03-27 19:08:16 +11:00
Greg Wilkins
15952aeee4 428232 - Rework batch mode / buffering in websocket. 2014-02-21 00:54:32 +11:00
Simone Bordet
5d8b00a098 Avoid boxing of the number of bytes flushed. 2014-02-18 18:31:48 +01:00
Simone Bordet
95c728c12f Do not track null ByteBuffers that are being released. 2014-02-10 09:46:16 +01:00
Joakim Erdfelt
36340c4898 Minor tweaks to leak detector stuff 2014-01-08 14:54:39 -07:00
Simone Bordet
8720fb213c 425043 - Track whether pools are used correctly.
Introduced LeakDetector and utility classes LeakTrackingConnectionPool
and LeakTrackingByteBufferPool to track resource pool leakages.

Fixed ConnectionPool to be more precise in closing connections when
release() cannot recycle the connection.

Fixed a leak in server's HttpConnection in case a request arrives with
the Connection: close header: a ByteBuffer was allocated but never
released.
2014-01-07 19:44:29 +01:00
Joakim Erdfelt
a12fd9ea03 Happy New Year - 2014! 2014-01-02 14:50:14 -07:00