- public static Props props(final DOMStoreTransactionChain chain){
- return Props.create(new Creator<ShardTransactionChain>(){
+ private ActorRef getShardActor(){
+ return getContext().parent();
+ }
+
+ private ActorRef createTypedTransactionActor(CreateTransaction createTransaction,String transactionId){
+ if(createTransaction.getTransactionType()== TransactionProxy.TransactionType.READ_ONLY.ordinal()){
+ return getContext().actorOf(
+ ShardTransaction.props( chain.newReadOnlyTransaction(), getShardActor(), schemaContext), transactionId);
+
+ }else if (createTransaction.getTransactionType()== TransactionProxy.TransactionType.READ_WRITE.ordinal()){
+ return getContext().actorOf(
+ ShardTransaction.props( chain.newReadWriteTransaction(), getShardActor(), schemaContext), transactionId);
+