private final DataTreeModification modification;
private final ActorContext actorContext;
private final ActorSelection leader;
- private Exception operationError;
+ private final Exception operationError;
protected LocalThreePhaseCommitCohort(final ActorContext actorContext, final ActorSelection leader,
final SnapshotBackedWriteTransaction<TransactionIdentifier> transaction, final DataTreeModification modification) {
this.leader = Preconditions.checkNotNull(leader);
this.transaction = Preconditions.checkNotNull(transaction);
this.modification = Preconditions.checkNotNull(modification);
+ this.operationError = null;
}
protected LocalThreePhaseCommitCohort(final ActorContext actorContext, final ActorSelection leader,
return actorContext.executeOperationAsync(leader, message, actorContext.getTransactionCommitOperationTimeout());
}
- void setOperationError(Exception operationError) {
- this.operationError = operationError;
- }
-
Future<ActorSelection> initiateCoordinatedCommit() {
final Future<Object> messageFuture = initiateCommit(false);
final Future<ActorSelection> ret = TransactionReadyReplyMapper.transform(messageFuture, actorContext,
if (failure != null) {
LOG.error("Failed to prepare transaction {} on backend", transaction.getIdentifier(), failure);
transactionAborted(transaction);
- } else if (CommitTransactionReply.SERIALIZABLE_CLASS.isInstance(message)) {
+ } else if (CommitTransactionReply.isSerializedType(message)) {
LOG.debug("Transaction {} committed successfully", transaction.getIdentifier());
transactionCommitted(transaction);
} else {