IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23726


Ignore:
Timestamp:
Apr 7, 2009, 1:50:26 PM (17 years ago)
Author:
jhoblitt
Message:

mark _db_index_for_key() & _db_for_index() as private

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/neb_distrib_20081210/Nebulous-Server/lib/Nebulous/Server.pm

    r23725 r23726  
    6767# EAM : In the 'distributed' version of Nebulous, there is a collection of N databases
    6868# the db_index uniquely defines the db used by a given key
    69 sub db_index_for_key
     69sub _db_index_for_key
    7070{
    7171    my ($self, $key) = @_;
     
    8787}
    8888
    89 sub db_for_index
     89sub _db_for_index
    9090{
    9191    my ($self, $db_index) = @_;
     
    158158
    159159    die "key not defined" unless defined $key;
    160     my $db_index = $self->db_index_for_key($key);
    161 
    162     my $dbh = $self->db_for_index($db_index);
     160    my $db_index = $self->_db_index_for_key($key);
     161
     162    my $dbh = $self->_db_for_index($db_index);
    163163    return $dbh;
    164164}
     
    385385    my $sql = $self->sql;
    386386
    387     my $dbidx1 = $self->db_index_for_key($key1);
    388     my $dbidx2 = $self->db_index_for_key($key2);
     387    my $dbidx1 = $self->_db_index_for_key($key1);
     388    my $dbidx2 = $self->_db_index_for_key($key2);
    389389    die "cannot swap keys not stored on the same database" unless ($dbidx1 == $dbidx2);
    390390
    391     my $dbh1 = $self->db_for_index($dbidx1);
    392     my $dbh2 = $self->db_for_index($dbidx2);
     391    my $dbh1 = $self->_db_for_index($dbidx1);
     392    my $dbh2 = $self->_db_for_index($dbidx2);
    393393    die "different db handles for the same db?" unless ($dbh1 == $dbh2);
    394394
     
    11211121    my $log = $self->log;
    11221122    my $sql = $self->sql;
    1123     my $db  = $self->db_for_index($index);
     1123    my $db  = $self->_db_for_index($index);
    11241124
    11251125    my @keys;
     
    13841384    my $log = $self->log;
    13851385    my $sql = $self->sql;
    1386     my $db  = $self->db_for_index(0); # XXX fix as above
     1386    my $db  = $self->_db_for_index(0); # XXX fix as above
    13871387
    13881388    $log->debug("entered - @_");
Note: See TracChangeset for help on using the changeset viewer.