| 45 | } |
| 46 | |
| 47 | Reference<ISingleThreadTransaction> ISingleThreadTransaction::create(Type type, Database const& cx) { |
| 48 | Reference<ISingleThreadTransaction> result; |
| 49 | if (type == Type::RYW) { |
| 50 | result = makeReference<ReadYourWritesTransaction>(); |
| 51 | } else if (type == Type::SIMPLE_CONFIG) { |
| 52 | result = makeReference<SimpleConfigTransaction>(); |
| 53 | } else { |
| 54 | result = makeReference<PaxosConfigTransaction>(); |
| 55 | } |
| 56 | result->construct(cx); |
| 57 | return result; |
| 58 | } |
| 59 | |
| 60 | Reference<ISingleThreadTransaction> ISingleThreadTransaction::create(Type type, |
| 61 | Database const& cx, |