private ByteBuf writeRequest ( ByteBuf buffer , Object request , ThreadContext context ) { context . serializer ( ) . writeObject ( request , OUTPUT . get ( ) . setByteBuf ( buffer ) ) ; if ( request instanceof ReferenceCounted ) { ( ( ReferenceCounted ) request ) . release ( ) ; } return buffer ; }
Writes a request to the given buffer .