Struct sanakirja::MutTxn [−][src]
Expand description
A mutable transaction.
Implementations
Setting the num
th element of the initial page, treated as a
[u64; 510]
, to value
. This doesn’t actually write anything
to that page, since that page is written during the commit.
In the current implementation, value
is probably going to be
the offset in the file of the root page of a B tree.
Setting the num
th element of the initial page, treated as a
[u64; 510].
Trait Implementations
Allocate a single page.
Increment the reference count for page off
.
Decrement the page’s reference count, assuming the page was first allocated by another transaction. If the RC reaches 0, free the page. Must return the new RC (0 if freed). Read more
Same as Self::decr_rc
, but for pages allocated by the current
transaction. This is an important distinction, as pages
allocated by the current transaction can be reused immediately
after being freed. Read more
The following is very easy, we’re just extending all values of the current transaction with values of the subtransaction.
When dropping a transaction, we need to unlock the read-write locks internal to this process, and possibly the file locks.
Reference-counting. Since reference-counts are designed to be storable into B trees by external allocators, pages referenced once aren’t stored, and hence are indistinguishable from pages that are never referenced. The default implementation returns 0. Read more