private static final AtomicLong counter = new AtomicLong();
- private final TransactionType readOnly;
+ private final TransactionType transactionType;
private final ActorContext actorContext;
private final Map<String, ActorSelection> remoteTransactionPaths = new HashMap<>();
private final String identifier;
public TransactionProxy(
ActorContext actorContext,
- TransactionType readOnly) {
+ TransactionType transactionType) {
this.identifier = "transaction-" + counter.getAndIncrement();
- this.readOnly = readOnly;
+ this.transactionType = transactionType;
this.actorContext = actorContext;
Object response = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new CreateTransaction(), ActorContext.ASK_DURATION);
ActorContext.ASK_DURATION);
if(response instanceof ReadDataReply){
ReadDataReply reply = (ReadDataReply) response;
+ if(reply.getNormalizedNode() == null){
+ return Optional.absent();
+ }
//FIXME : A cast should not be required here ???
return (Optional<NormalizedNode<?, ?>>) Optional.of(reply.getNormalizedNode());
}
}
}
- return new ThreePhaseCommitCohortProxy(cohortPaths);
+ return new ThreePhaseCommitCohortProxy(actorContext, cohortPaths);
}
@Override