THRIFT-81. java: TNonblockingServer: Support a limit on read buffer size
authorDavid Reiss <dreiss@apache.org>
Fri, 21 Nov 2008 23:07:05 +0000 (23:07 +0000)
committerDavid Reiss <dreiss@apache.org>
Fri, 21 Nov 2008 23:07:05 +0000 (23:07 +0000)
commit04c315946c68034a51376bab368a4c4c2c8a8ba5
treebb54703ff9e875ca11a533592f51f9b7173e77f7
parentfd71808e35af5ba82a29320abfcbc30ef7fc6b87
THRIFT-81. java: TNonblockingServer: Support a limit on read buffer size

This change makes it possible to set a maximum amount of memory that
TNonblockingServer will use for all read buffers (combined).
If it is exceeded, no new data will be read from clients until
memory is freed.  The current implementation does a busy wait in
the main thread when this happens.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719741 13f79535-47bb-0310-9956-ffa450edef68
lib/java/src/com/facebook/thrift/TByteArrayOutputStream.java
lib/java/src/com/facebook/thrift/server/THsHaServer.java
lib/java/src/com/facebook/thrift/server/TNonblockingServer.java
test/java/TestNonblockingServer
test/java/src/OverloadNonblockingServer.java [new file with mode: 0644]