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