remove deprecated stats stuff from server.
[MogileFS-Server.git] / lib / MogileFS / RebalancePolicy.pm
blobb30340cc8a25d0776eb42f69599e5b692b1472c7
1 package MogileFS::RebalancePolicy;
2 use strict;
3 use warnings;
5 sub new {
6 my ($class) = @_;
7 return bless {
8 'devfid_magazine' => [], # devfids queued up for next
9 # called to 'devfid_to_rebalance'
10 }, $class;
13 # return DevFID (or undef) of a devid to migrate away
14 sub devfid_to_rebalance {
15 my ($self) = @_;
16 my $mag = $self->{devfid_magazine};
17 return shift @$mag if @$mag;
18 push @$mag, $self->devfids_to_rebalance;
19 return shift @$mag;
22 sub devfids_to_rebalance {
23 return ()
26 # return MogileFS::Device objects which shouldn't
27 # be replicated towards, since it wouldn't help
28 # out...
29 sub dest_devs_to_avoid {
30 my $self = shift;