<<

NAME

Inca::ReporterManager::Scheduler - Abstract class for ReporterManager schedulers

SYNOPSIS

  package Inca::ReporterManager::Scheduler::MyScheduler;
  use base qw(Inca::ReporterManager::Scheduler);
  @ISA = ( "Inca::ReporterManager::Scheduler" );

  # this function is called from the constructor to read additional 
  # scheduler arguments.  If your scheduler doesn't have any, you 
  # can use the default definition (which does nothing)
  sub readArgs {
  }

  # you must overload this in order to accept scheduling requests
  sub submit {
  }

DESCRIPTION

This is an abstract base class for reporter manager schedulers. A reporter manager scheduler at a minimum needs to supply its own submit function. If a scheduler has arguments, then it can override readArgs.

CLASS METHODS

new( $args, $check_period, $credentials, $depots, $depot_timeout, $reporter_cache, $rim_path, $tmpdir )

Base class constructor for reporter manager schedulers. The constructor must be called with the following arguments.

Arguments:

args

A reference to a hash array containing the schedulers configuration inforamtion

check_period

A positive integer indicating the period in seconds of which to check the reporter for exceeding resource limits.

credentials

A reference to a hash array containing the credential information.

depots

A reference to an array of depot uris. The report will be sent to the first depot in the list. If the first depot is unreachable, the next depots in the list will be tried.

depot_timeout

A positive integer indicating the period in seconds of which to time out a send of a report to the depot.

reporter_cache

An object of type Inca::ReporterManager::ReporterCache which is used to map reporter uris to a local path.

rim_path

A string containing the path to the reporter-instance-manager program.

tmpdir

A string containing a path to a temporary file space that Inca can use while executing reporters

isRunning( )

Check if the scheduler is running. A subclass should override this function only if their scheduler maintains objects that need to be explicitly started and stopped. This base class function does nothing.

Returns:

Returns true if the scheduler is running and false otherwise.

readArgs( $args )

A subclass should override this function if they want to reads in scheduler specific configuration information. This base class function does nothing.

Arguments:

args

A reference to a hash containing configuration information for the scheduler

setLogger( )

Set a log file for the reporter-instance-managers.

start( )

A subclass should override this function only if their scheduler maintains objects that need to be explicitly started and stopped. This base class function does nothing.

Returns:

Returns true if there were no errors starting the scheduler; returns false otherwise.

stop( )

A subclass should override this function only if their scheduler maintains objects that need to be explicitly started and stopped. This base class function does nothing.

Returns:

Returns true if there were no errors stopping the scheduler; returns false otherwise.

submit( $action, @reporters )

Accepts an action (e.g., add, delete) and any number of reporters and executes them according to the subclass scheduling algorithm. Subclasses must override this function. This base class function will issue a croak if called.

Arguments:

action

A string containing an action (e.g., add, delete) pertaining to the group of reporters.

configs

An array of Inca::Config::Suite::SeriesConfig objects.

Returns:

Returns 1 if the reporters where accepted by the scheduler; otherwise returns 0.

AUTHOR

Shava Smallen <ssmallen@sdsc.edu>

CAVEATS/WARNINGS

No known problems.

<<