Exemplo n.º 1
0
Arquivo: DB.cs Projeto: bkwcl/LevelDB
        public void Write(WriteBatch batch, WriteOptions options)
        {
            IntPtr error;

            LevelDBInterop.leveldb_write(this.Handle, options.Handle, batch.Handle, out error);
            Throw(error);
        }
Exemplo n.º 2
0
 ///DOLATER <summary>Add Description</summary>
 /// <param name="batch">FILL IN</param>
 /// <param name="options">FILL IN</param>
 public void Write(WriteBatch batch, WriteOptions options)
 {
     LevelDBInterop.leveldb_write(this.Handle, options.Handle, batch.Handle, out IntPtr error);
     LevelDBException.Check(error);
     GC.KeepAlive(batch);
     GC.KeepAlive(options);
     GC.KeepAlive(this);
 }
Exemplo n.º 3
0
        public void Write(WriteOptions options, WriteBatch write_batch)
        {
            byte retry = 0;

            while (true)
            {
                try
                {
                    IntPtr error;
                    LevelDBInterop.leveldb_write(Handle, options.Handle, write_batch.Handle, out error);
                    break;
                }
                catch (LevelDBException ex)
                {
                    if (++retry >= 4)
                    {
                        throw;
                    }
                    System.IO.File.AppendAllText("leveldb.log", ex.Message + "\r\n");
                }
            }
        }