public Job LoadTransaction(string storeId, ITransactionInfo txn) { var transactionLog = _storeManager.GetTransactionLog(_baseLocation + "\\" + storeId); var jobId = Guid.NewGuid(); switch (txn.TransactionType) { case TransactionType.ImportJob: var importJob = new ImportJob(jobId, null); importJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return(importJob); case TransactionType.UpdateTransaction: var updateJob = new UpdateTransaction(jobId, null); updateJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return(updateJob); case TransactionType.SparqlUpdateTransaction: var sparqlUpdateJob = new SparqlUpdateJob(jobId, null, null); sparqlUpdateJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return(sparqlUpdateJob); } return(null); }
public Job LoadTransaction(string storeId, ITransactionInfo txn) { var transactionLog = _storeManager.GetTransactionLog(_baseLocation + "\\" + storeId); var jobId = Guid.NewGuid(); switch (txn.TransactionType) { case TransactionType.ImportJob: var importJob = new ImportJob(jobId, null); importJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return importJob; case TransactionType.UpdateTransaction: var updateJob = new UpdateTransaction(jobId, null); updateJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return updateJob; case TransactionType.SparqlUpdateTransaction: var sparqlUpdateJob = new SparqlUpdateJob(jobId, null, null); sparqlUpdateJob.ReadTransactionDataFromStream(transactionLog.GetTransactionData(txn.DataStartPosition)); return sparqlUpdateJob; } return null; }