com.xiaomi.infra.galaxy.talos.producer.UserMessageResult Maven / Gradle / Ivy
/**
* Copyright 2015, Xiaomi.
* All rights reserved.
* Author: [email protected]
*/
package com.xiaomi.infra.galaxy.talos.producer;
import java.util.List;
import com.xiaomi.infra.galaxy.talos.thrift.Message;
public class UserMessageResult {
private List messageList;
private int partitionId;
private boolean successful;
private Throwable cause;
public UserMessageResult(List messageList, int partitionId) {
this.messageList = messageList;
this.partitionId = partitionId;
this.successful = false;
this.cause = null;
}
public int getPartitionId() {
return partitionId;
}
public boolean isSuccessful() {
return successful;
}
public List getMessageList() {
return messageList;
}
public Throwable getCause() {
return cause;
}
public UserMessageResult setSuccessful(boolean successful) {
this.successful = successful;
return this;
}
public UserMessageResult setCause(Throwable cause) {
this.cause = cause;
return this;
}
}