Esempio n. 1
0
    // =-=-=-=-=-=-=-
    // pass_thru_file_rebalance - code which would rebalance the subtree
    irods::error pass_thru_file_rebalance(
        irods::resource_plugin_context& _ctx ) {
        // =-=-=-=-=-=-=-
        // forward request for rebalance to children
        irods::error result = SUCCESS();
        irods::resource_child_map::iterator itr = _ctx.child_map().begin();
        for ( ; itr != _ctx.child_map().end(); ++itr ) {
            irods::error ret = itr->second.second->call(
                                   _ctx.comm(),
                                   irods::RESOURCE_OP_REBALANCE,
                                   _ctx.fco() );
            if ( !ret.ok() ) {
                irods::log( PASS( ret ) );
                result = ret;
            }
        }
        
        if( !result.ok() ) {
            return PASS( result );
        }

        return update_resource_object_count( 
                   _ctx.comm(),
                   _ctx.prop_map() );

    } // pass_thru_file_rebalancec
Esempio n. 2
0
    // =-=-=-=-=-=-=-
    // univ_mss__file_rebalance - code which would rebalance the subtree
    irods::error univ_mss__file_rebalance(
        irods::resource_plugin_context& _ctx ) {
        return update_resource_object_count( 
                   _ctx.comm(),
                   _ctx.prop_map() );

    } // univ_mss__file_rebalancec
Esempio n. 3
0
    // =-=-=-=-=-=-=-
    // mock_archive_rebalance - code which would rebalance the subtree
    irods::error mock_archive_rebalance(
        irods::resource_plugin_context& _ctx ) {

        return update_resource_object_count(
                   _ctx.comm(),
                   _ctx.prop_map() );

    } // mock_archive_file_rebalancec
 irods::error impostor_resource_rebalance_plugin(
     irods::resource_plugin_context& _ctx ) {
     return update_resource_object_count( 
                _ctx.comm(),
                _ctx.prop_map() );
 } // impostor_resource_rebalance_plugin