Last active
November 28, 2016 23:39
-
-
Save apurvam/2a92e13cd7602c9d8d81481f5b99a087 to your computer and use it in GitHub Desktop.
TransactionMetadata class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransactionResponse { | |
/** | |
* All the error codes that may be returned by transactional methods. | |
*/ | |
public enum TransactionError { | |
PRODUCER_FENCED, | |
NO_PID_MAPPING, | |
NOT_COORDINATOR_FOR_APP_ID, | |
INVALID_TXN_REQUEST, | |
COORDINATOR_NOT_AVAILABLE, | |
INVALID_SEQUENCE_NUMBER | |
} | |
/** | |
* Returns true if the request was successful, false otherwise. | |
*/ | |
public boolean isSuccess(); | |
/** | |
* If isSuccess returns false, this method will return the error that occurred in processing the transaction. | |
*/ | |
public TransactionError getError(); | |
/** | |
* The list of partitions currently part of the transaction. | |
*/ | |
public List<TopicPartition> partitions(); | |
/** | |
* The current epoch of this AppId. | |
*/ | |
public long epoch(); | |
/** | |
* The AppId for this transaction. | |
*/ | |
public String appId(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment