IntPtr GetPage(ref uint pageNo, Txn txn, CachePageGetFlags flags) { if (txn != null) { lock (txn.rscLock) { DB_TXN *txp = txn.CheckDisposed(); return((IntPtr)GetPage(ref pageNo, txp, flags)); } } else { return((IntPtr)GetPage(ref pageNo, (DB_TXN *)null, flags)); } }
public Int64 Get(Txn txn, Int32 delta, ReadFlags flags) { if (txn != null) { lock (txn.rscLock) { DB_TXN *txp = txn.CheckDisposed(); return(Get(txp, delta, flags)); } } else { return(Get((DB_TXN *)null, delta, flags)); } }
public void Open(Txn txn, ref DbEntry key, OpenFlags flags) { DbRetVal ret; if (txn != null) { lock (txn.rscLock) { DB_TXN *txp = txn.CheckDisposed(); ret = Open(txp, ref key, flags); } } else { ret = Open((DB_TXN *)null, ref key, flags); } Util.CheckRetVal(ret); }
public void Remove(Txn txn, RemoveFlags flags) { DbRetVal ret; if (txn != null) { lock (txn.rscLock) { DB_TXN *txp = txn.CheckDisposed(); ret = Remove(txp, flags); } } else { ret = Remove((DB_TXN *)null, flags); } GC.SuppressFinalize(this); Util.CheckRetVal(ret); }
public void Remove(Txn txn, RemoveFlags flags) { DbRetVal ret; if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); ret = Remove(txp, flags); } } else ret = Remove((DB_TXN*)null, flags); GC.SuppressFinalize(this); Util.CheckRetVal(ret); }
public Int64 Get(Txn txn, Int32 delta, ReadFlags flags) { if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); return Get(txp, delta, flags); } } else return Get((DB_TXN*)null, delta, flags); }
public void Open(Txn txn, ref DbEntry key, OpenFlags flags) { DbRetVal ret; if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); ret = Open(txp, ref key, flags); } } else ret = Open((DB_TXN*)null, ref key, flags); Util.CheckRetVal(ret); }
IntPtr GetPage(ref uint pageNo, Txn txn, CachePageGetFlags flags) { if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); return (IntPtr)GetPage(ref pageNo, txp, flags); } } else return (IntPtr)GetPage(ref pageNo, (DB_TXN*)null, flags); }
public void LogPrintFile(Txn txn, string msg) { byte[] msgBytes = null; int count = Util.StrToUtf8(msg, ref msgBytes); if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); LogPrintFile(txp, msgBytes); } } else LogPrintFile(null, msgBytes); }
public Txn TxnBegin(Txn parent, Txn.BeginFlags flags) { Txn txn = new Txn(this); DbRetVal ret; // lock environement first, to avoid deadlocks lock (rscLock) { if (parent != null) { lock (parent.rscLock) { DB_TXN* parxp = parent.CheckDisposed(); ret = TxnBegin(parxp, txn, flags); } } else ret = TxnBegin(null, txn, flags); } Util.CheckRetVal(ret); return txn; }
public void DbRename(Txn txn, string file, string database, string newname, WriteFlags flags) { byte[] fBytes = null; Util.StrToUtf8(file, ref fBytes); byte[] dBytes = null; Util.StrToUtf8(database, ref dBytes); byte[] nBytes = null; Util.StrToUtf8(newname, ref nBytes); DbRetVal ret; // lock environement first, to avoid deadlocks lock (rscLock) { if (txn != null) { lock (txn.rscLock) { DB_TXN* txp = txn.CheckDisposed(); ret = DbRename(txp, fBytes, dBytes, nBytes, flags); } } else ret = DbRename(null, fBytes, dBytes, nBytes, flags); } Util.CheckRetVal(ret); }