- }else if (createTransaction.getTransactionType()== TransactionProxy.TransactionType.WRITE_ONLY.ordinal()){
- return getContext().actorOf(
- ShardTransaction.props( store.newWriteOnlyTransaction(), getSelf(), schemaContext), transactionId);
- }else{
- throw new IllegalArgumentException ("CreateTransaction message has unidentified transaction type="+createTransaction.getTransactionType()) ;
- }
- }
+ shardMBean.incrementReadOnlyTransactionCount();
+
+ return getContext().actorOf(
+ ShardTransaction.props(store.newReadOnlyTransaction(), getSelf(),
+ schemaContext,datastoreContext, shardMBean), transactionId.toString());
+
+ } else if (transactionType
+ == TransactionProxy.TransactionType.READ_WRITE.ordinal()) {
+
+ shardMBean.incrementReadWriteTransactionCount();
+
+ return getContext().actorOf(
+ ShardTransaction.props(store.newReadWriteTransaction(), getSelf(),
+ schemaContext, datastoreContext, shardMBean), transactionId.toString());
+
+
+ } else if (transactionType
+ == TransactionProxy.TransactionType.WRITE_ONLY.ordinal()) {
+
+ shardMBean.incrementWriteOnlyTransactionCount();
+
+ return getContext().actorOf(
+ ShardTransaction.props(store.newWriteOnlyTransaction(), getSelf(),
+ schemaContext, datastoreContext, shardMBean), transactionId.toString());
+ } else {
+ throw new IllegalArgumentException(
+ "Shard="+name + ":CreateTransaction message has unidentified transaction type="
+ + transactionType);
+ }
+ }