-
-
31 Mar 2011 01:46:38 UTC
- Distribution: KiokuDB
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (233 / 6 / 2)
- Kwalitee
Bus factor: 3- License: unknown
- Activity
24 month- Tools
- Download (153.35KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Cache::Ref
- Class::MOP
- Data::Stream::Bulk
- Data::UUID::LibUUID
- Data::Visitor
- Digest::SHA
- Hash::Util::FieldHash::Compat
- IO
- JSON
- JSON::XS
- Module::Pluggable::Object
- Moose
- MooseX::Clone
- MooseX::Role::Parameterized
- MooseX::YAML
- PadWalker
- Path::Class
- Scalar::Util
- Scope::Guard
- Search::GIN
- Set::Object
- Storable
- Task::Weaken
- Test::Exception
- Test::More
- Test::use::ok
- Throwable
- Tie::ToObject
- Try::Tiny
- YAML::XS
- namespace::clean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?
The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.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.
Entries with
deleted
should be removed from the database, entries with aprev
entry should be inserted, and all other entries should be updated.Multiple entries may be given for a single object, for instance an object that was first inserted and then modified will have an insert entry and an update entry.
- get_from_storage
-
Should be the same as "get" in KiokuDB::Backend.
When no memory buffered entries are available for the object one is fetched from the backend.
- exists_in_storage
-
Required as of KiokuDB version 0.37.
A fallback implementation is provided, but should not be used and will issue a deprecation warning.
Module Install Instructions
To install KiokuDB, copy and paste the appropriate command in to your terminal.
cpanm KiokuDB
perl -MCPAN -e shell install KiokuDB
For more information on module installation, please visit the detailed CPAN module installation guide.