/// <summary> /// Compact the underlying storage for the key range [*begin,*end]. /// In particular, deleted and overwritten versions are discarded, /// and the data is rearranged to reduce the cost of operations /// needed to access the data. This operation should typically only /// be invoked by users who understand the underlying implementation. /// </summary> /// <param name="startKey">FILL IN</param> /// <param name="limitKey">FILL IN</param> public void CompactRange(Byte[] startKey, Byte[] limitKey) { try { LevelDBInterop.leveldb_compact_range( this.Handle, startKey, LevelDBInterop.MarshalSize(startKey), limitKey, LevelDBInterop.MarshalSize(limitKey)); } catch (Exception ex) { while (ex != null) { System.Diagnostics.Debug.WriteLine(ex.Message); System.Diagnostics.Debug.WriteLine(ex.StackTrace); ex = ex.InnerException; } } GC.KeepAlive(this); }
/// <summary> /// Compact the underlying storage for the key range [*begin,*end]. /// In particular, deleted and overwritten versions are discarded, /// and the data is rearranged to reduce the cost of operations /// needed to access the data. This operation should typically only /// be invoked by users who understand the underlying implementation. /// </summary> /// <param name="startKey"></param> /// <param name="limitKey"></param> public void CompactRange(byte[] startKey, byte[] limitKey) { LevelDBInterop.leveldb_compact_range(Handle, startKey, LevelDBInterop.MarshalSize(startKey), limitKey, LevelDBInterop.MarshalSize(limitKey)); GC.KeepAlive(this); }