Mina的一个主要保证

Mina的一个重要保证
MINA ensures that there will never be more than one thread simultaneously executing the decode() function for the same IoSession, but it does not guarantee that it will always be the same thread. Suppose the first piece of data is handled by thread-1 who decides it cannot yet decode, when the next piece of data arrives, it could be handled by another thread. To avoid visibility problems, you must properly synchronize access to this decoder state (IoSession attributes are stored in a ConcurrentHashMap, so they are automatically visible to other threads).

MINA会保证不会有超过1条线程,同时在为IoSession执行decode()方法。简单来说,同一个IoSession对象是支持并发操作的。