All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.feingto.cloud.dto.tcc.TccRequest Maven / Gradle / Ivy

There is a newer version: 2.3.8.RELEASE
Show newest version
package com.feingto.cloud.dto.tcc;

import com.feingto.cloud.core.json.JSON;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 事务模型
 *
 * @author longfei
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TccRequest implements Serializable {
    private static final long serialVersionUID = 3721580645655868196L;

    /**
     * 主线事务ID
     */
    private String id;

    /**
     * 参与者
     */
    @Builder.Default
    private List participants = new ArrayList<>();

    public Message toMessage() {
        return MessageBuilder.withPayload(JSON.build().obj2json(this)).build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy