public static Serializer getSerializer(int idx) {
        Serializer currentSerializer = serializers[idx];
        if (currentSerializer == null && idx == Hessian2) {
            REENTRANT_LOCK.lock();
            try {
                currentSerializer = serializers[idx];
                if (currentSerializer == null) {
                    currentSerializer = new HessianSerializer();
                    addSerializer(Hessian2, currentSerializer);
                }
            } finally {
                REENTRANT_LOCK.unlock();
            }
        }
        return currentSerializer;
    }
Manage all serializers.

Notice: Serializer is different with Codec.
Serializer is mainly used to deserialize bytes to object, or serialize object to bytes. We can use hessian, json, protocol buff etc.
Codec mainly used to encode bytes or decode bytes according to the protocol format. We can use {@link com.alipay.remoting.codec.ProtocolCodeBasedEncoder} or {@link io.netty.handler.codec.LengthFieldBasedFrameDecoder} etc.

@author jiangping
@version $Id: SerializerManager.java, v 0.1 2015-9-28 PM3:55:59 tao Exp $
src/main/java/com/alipay/remoting/serialization/SerializerManager.java