@Override public Configuration getCustomOptions() { return handleConfig.getCustomOptions(); }
/** * Copies everything from {@code template} to this builder except for * the {@code commitTime}. * * @param template * an existing transaction from which this builder will take * its values */ public Builder(BaseTransactionConfig template) { customOptions(template.getCustomOptions()); groupName(template.getGroupName()); timestampProvider(template.getTimestampProvider()); }
@Override public ExpectedValueCheckingTransaction beginTransaction(BaseTransactionConfig configuration) throws BackendException { // Get a transaction without any guarantees about strong consistency StoreTransaction inconsistentTx = manager.beginTransaction(configuration); // Get a transaction that provides global strong consistency Configuration customOptions = new MergedConfiguration(storeFeatures.getKeyConsistentTxConfig(), configuration.getCustomOptions()); BaseTransactionConfig consistentTxCfg = new StandardBaseTransactionConfig.Builder(configuration) .customOptions(customOptions).build(); StoreTransaction strongConsistentTx = manager.beginTransaction(consistentTxCfg); // Return a wrapper around both the inconsistent and consistent store transactions return new ExpectedValueCheckingTransaction(inconsistentTx, strongConsistentTx, maxReadTime); }