NAME

KiokuDB::Backend::Role::TXN::Memory - In memory transactions.

SYNOPSIS

with qw(KiokuDB::Backend::Role::TXN::Memory);

sub commit_entries {
    my ( $self, @entries ) = @_;

    # atomically apply @entries

    # deleted entries have the deleted flag set
    # if an entry has no 'prev' entry it's an insert
    # otherwise it's an update
}

DESCRIPTION

This backend provides in memory transactions for backends which support atomic modification of data, but not full commit/rollback support.

This backend works by buffering all operations in memory. Entries are kept alive allowing read operations go to the live entry even for objects that are out of scope.

This implementation provides repeatable read level isolation. Durability, concurrency and atomicity are still the responsibility of the backend.

REQUIRED METHODS

commit_entries

Insert, update or delete entries as specified.

This operation should either fail or succeed atomically.