/** * Internal operation - to get a dataset for application use, call a * {@link TDBFactory} function. Do not use the base dataset without knowing how the * transaction system uses it. */ public DatasetGraphTDB getBaseDataset() { checkValid(); return baseDSG; }
/** Indicate whether there are any active transactions. * @see #getTransMgrState */ public boolean activeTransactions() { checkValid(); return transactionManager.activeTransactions(); }
/** Return a description of the transaction manager state */ public SysTxnState getTransMgrState() { checkValid(); return transactionManager.state(); }
public Location getLocation() { checkValid(); return baseDSG.getLocation(); }
/** * Begin a transaction. Terminate a write transaction with * {@link Transaction#commit()} or {@link Transaction#abort()}. * Terminate a write transaction with {@link Transaction#close()}. */ public DatasetGraphTxn begin(TxnType mode) { checkValid(); checkTransactional(); haveUsedInTransaction = true; return transactionManager.begin(mode, null); }
/** * Begin a transaction, giving it a label. Terminate a write transaction * with {@link Transaction#commit()} or {@link Transaction#abort()}. * Terminate a write transaction with {@link Transaction#close()}. */ public DatasetGraphTxn begin(TxnType mode, String label) { checkValid(); checkTransactional(); return transactionManager.begin(mode, label); }
/** Flush the delayed write queue to the base storage. * This can only be done if there are no active transactions. * If there are active transactions, nothing is done but this is safe to call. */ public void flush() { if ( !haveUsedInTransaction() ) return; checkValid(); transactionManager.flush(); }