X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBM%2FDeep%2FSector%2FFile%2FBucketList.pm;fp=lib%2FDBM%2FDeep%2FEngine%2FSector%2FBucketList.pm;h=349fa3ac44186959b7c90a092b77e27ed65f7247;hb=2c70efe15fa947d7e8971691d3e8d55005b4af37;hp=65887db9d89e4828ff979d1cc390144310fff4bc;hpb=f4d0ac973fcdc7932465a23d38da10d89996eef3;p=dbsrgits%2FDBM-Deep.git diff --git a/lib/DBM/Deep/Engine/Sector/BucketList.pm b/lib/DBM/Deep/Sector/File/BucketList.pm similarity index 94% rename from lib/DBM/Deep/Engine/Sector/BucketList.pm rename to lib/DBM/Deep/Sector/File/BucketList.pm index 65887db..349fa3a 100644 --- a/lib/DBM/Deep/Engine/Sector/BucketList.pm +++ b/lib/DBM/Deep/Sector/File/BucketList.pm @@ -1,11 +1,11 @@ -package DBM::Deep::Engine::Sector::BucketList; +package DBM::Deep::Sector::File::BucketList; use 5.006_000; use strict; use warnings FATAL => 'all'; -use base qw( DBM::Deep::Engine::Sector ); +use base qw( DBM::Deep::Sector::File ); my $STALE_SIZE = 2; @@ -68,7 +68,7 @@ sub free { # Delete the keysector my $l = unpack( $StP{$e->byte_size}, substr( $rest, $e->hash_size, $e->byte_size ) ); - my $s = $e->_load_sector( $l ); $s->free if $s; + my $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; # Delete the HEAD sector $l = unpack( $StP{$e->byte_size}, @@ -77,7 +77,7 @@ sub free { $e->byte_size, ), ); - $s = $e->_load_sector( $l ); $s->free if $s; + $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; foreach my $txn ( 0 .. $e->num_txns - 2 ) { my $l = unpack( $StP{$e->byte_size}, @@ -86,7 +86,7 @@ sub free { $e->byte_size, ), ); - my $s = $e->_load_sector( $l ); $s->free if $s; + my $s = DBM::Deep::Sector::File->load( $e, $l ); $s->free if $s; } } @@ -198,7 +198,7 @@ sub write_md5 { $engine->add_entry( $args->{trans_id}, $spot ); unless ($self->{found}) { - my $key_sector = DBM::Deep::Engine::Sector::Scalar->new({ + my $key_sector = DBM::Deep::Sector::File::Scalar->new({ engine => $engine, data => $args->{key}, }); @@ -283,7 +283,7 @@ sub delete_md5 { $key_sector->free; - my $data_sector = $self->engine->_load_sector( $location ); + my $data_sector = DBM::Deep::Sector::File->load( $self->engine, $location ); my $data = $data_sector->data({ export => 1 }); $data_sector->free; @@ -350,7 +350,7 @@ sub get_data_for { my $location = $self->get_data_location_for({ allow_head => $args->{allow_head}, }); - return $self->engine->_load_sector( $location ); + return DBM::Deep::Sector::File->load( $self->engine, $location ); } sub get_key_for { @@ -369,7 +369,7 @@ sub get_key_for { $location = unpack( $StP{$self->engine->byte_size}, $location ); DBM::Deep->_throw_error( "get_key_for: No location?" ) unless $location; - return $self->engine->_load_sector( $location ); + return DBM::Deep::Sector::File->load( $self->engine, $location ); } 1;