예제 #1
0
 DbRetVal OpenLogCursor(LogCursor logc, int flags) {
   DbRetVal ret;
   RuntimeHelpers.PrepareConstrainedRegions();
   try { }
   finally {
     DB_LOGC* logcp;
     DB_ENV* evp = CheckDisposed();
     ret = evp->LogCursor(evp, out logcp, unchecked((UInt32)flags));
     if (ret == DbRetVal.SUCCESS) {
       logc.Initialize(logcp);
       logCursors.Insert(logc);
     }
   }
   return ret;
 }
예제 #2
0
 public LogCursor OpenLogCursor() {
   LogCursor logc = new LogCursor(this);
   DbRetVal ret;
   // lock environement first, to avoid deadlocks
   lock (rscLock) {
     ret = OpenLogCursor(logc, 0);
   }
   Util.CheckRetVal(ret);
   return logc;
 }
예제 #3
0
 // requires synchronization lock on rscLock
 internal bool RemoveLogCursor(LogCursor logc) {
   return logCursors.Remove(logc);
 }