mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: Is ThreadModel really useful?
Date Fri, 08 Dec 2006 16:30:41 GMT
On 12/8/06, Michael Bauroth <michael.bauroth@falcom.de> wrote:
>
> Hi,
>
> in different tests I found out an temporary optimal solution for my
> demands. It looks like:
>
> (using SimpleAllocator, HeapBuffer at the moment)
>
> mAcceptor = new SocketAcceptor( 2, Executors.newCachedThreadPool() );
> mAcceptor.setThreadModel(ThreadModel.MANUAL);
> mAcceptor.getFilterChain().addLast( "CONNECTION_LIMITER", new
> ConnectionLimitFilter( 30000 ) );
> mAcceptor.getFilterChain().addLast( "CODECS", new ProtocolCodecFilter(
> new MultiStageCodecFactory()) );
> mAcceptor.getFilterChain().addLast( "THREADPOOL", new ExecutorFilter(
> Executors.newFixedThreadPool( 4 ) ) );
>
> What does your suggestions mean for this case? Will this config still be
> available or do I have to change something?


If we remove ThreadModel interface, removing the second line (
mAcceptor.setThreadModel(...)) will suffice.  That's all.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message