Ejemplo n.º 1
0
        public void Commit(WriteBatch batch)
        {
            switch (State)
            {
            case TrackState.Added:
            case TrackState.Changed:
                batch.Put(prefix, Item.ToArray());
                break;

            case TrackState.Deleted:
                batch.Delete(prefix);
                break;
            }
        }
Ejemplo n.º 2
0
        public void Commit(WriteBatch batch)
        {
            TR.Enter();
            TR.Log(State);
            switch (State)
            {
            case TrackState.Added:
            case TrackState.Changed:
                batch.Put(prefix, Item.ToArray());
                break;

            case TrackState.Deleted:
                batch.Delete(prefix);
                break;
            }
            TR.Exit();
        }
Ejemplo n.º 3
0
 public override void DeleteInternal(TKey key)
 {
     batch?.Delete(prefix, key);
 }
Ejemplo n.º 4
0
 public static void Delete(this WriteBatch batch, byte prefix, ISerializable key)
 {
     batch.Delete(SliceBuilder.Begin(prefix).Add(key));
 }
Ejemplo n.º 5
0
 public override void DeleteInternal(TKey key)
 {
     TR.Enter();
     batch?.Delete(prefix, key);
     TR.Exit();
 }