class ParamFlowRequestDataWriter implements EntityWriter<ParamFlowRequestData, ByteBuf> {

    public List<Object> resolveValidParams(Collection<Object> params) {
        List<Object> validParams = new ArrayList<>();
        int size = 0;
        for (Object param : params) {
            int s = calculateParamTransportSize(param);
            if (s <= 0) {
                RecordLog.warn("[ParamFlowRequestDataWriter] WARN: Non-primitive type detected in params of "
                        + "cluster parameter flow control, which is not supported: " + param);
                continue;
            }
            if (size + s > maxParamByteSize) {
                RecordLog.warn("[ParamFlowRequestDataWriter] WARN: params size is too big." +
                        " the configure value is : " + maxParamByteSize + ", the params size is: " + params.size());
                break;
            }
            size += s;
            validParams.add(param);
        }
        return validParams;
    }

    public  ParamFlowRequestDataWriter();
    public  ParamFlowRequestDataWriter(int maxParamByteSize);

}