Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Static Private Attributes | Friends | List of all members
protocols::jd2::archive::ArchiveManager Class Reference

ArchiveManager is responsible for communication with JobDistributor and organization of Batches and returning decoys he owns an Archive (AbstractArchiveBase) that will be handed the decoys and is asked to generate_batch() if the QUEUE_EMPTY . More...

#include <ArchiveManager.hh>

Collaboration diagram for protocols::jd2::archive::ArchiveManager:
Collaboration graph
[legend]

Public Types

typedef utility::vector1< BatchBatchList
 

Public Member Functions

 ArchiveManager (core::Size archive_rank, core::Size jd_master_rank, core::Size file_buf_rank)
 ctor is protected; singleton pattern More...
 
virtual ~ArchiveManager ()
 
void go (ArchiveBaseOP)
 
Batchstart_new_batch (core::io::silent::SilentStructOPs const &start_decoys)
 
Batchstart_new_batch ()
 
void finalize_batch (Batch &, bool reread=false)
 
core::Size last_batch_id () const
 
BatchList const & batches () const
 
core::Size unfinished_batches () const
 
void cancel_batch (Batch &batch, bool allow_reading_of_decoys=true)
 
void cancel_batches_previous_to (core::Size batch_id, bool allow_reading_of_decoys=true)
 
void save_archive ()
 

Static Public Member Functions

static void register_options ()
 

Protected Member Functions

virtual void batch_underflow ()
 triggered in slave if new batch_ID comes in. More...
 
void idle ()
 
void jobs_completed ()
 
void queue_batch (Batch const &batch)
 
void cancel_batch (Batch const &batch)
 
void read_existing_batches ()
 
void register_batch (Batch new_batch)
 
void send_stop_to_jobdistributor ()
 
bool restore_archive ()
 

Private Types

typedef
MPIArchiveJobDistributor::CompletionMessage 
CompletionMessage
 
typedef std::map< core::Size,
CompletionMessage
CompletionMessages
 

Private Attributes

utility::vector1< Batchbatches_
 
core::Size const archive_rank_
 
core::Size const jd_master_rank_
 
core::Size const file_buf_rank_
 
AbstractArchiveBaseOP theArchive_
 
CompletionMessages jobs_completed_
 
core::Size save_archive_time_interval_
 specify seconds between automatic saves to filesystem More...
 

Static Private Attributes

static bool options_registered_
 

Friends

class JobDistributorFactory
 

Detailed Description

ArchiveManager is responsible for communication with JobDistributor and organization of Batches and returning decoys he owns an Archive (AbstractArchiveBase) that will be handed the decoys and is asked to generate_batch() if the QUEUE_EMPTY .

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::jd2::archive::ArchiveManager::ArchiveManager ( core::Size  archive_rank,
core::Size  jd_master_rank,
core::Size  file_buf_rank 
)

ctor is protected; singleton pattern

constructor. Notice it calls the parent class! It also builds some internal variables for determining which processor it is in MPI land.

References options_registered_.

virtual protocols::jd2::archive::ArchiveManager::~ArchiveManager ( )
inlinevirtual

Member Function Documentation

virtual void protocols::jd2::archive::ArchiveManager::batch_underflow ( )
inlineprotectedvirtual

triggered in slave if new batch_ID comes in.

BatchList const& protocols::jd2::archive::ArchiveManager::batches ( ) const
inline
void protocols::jd2::archive::ArchiveManager::cancel_batch ( Batch batch,
bool  allow_reading_of_decoys = true 
)
void protocols::jd2::archive::ArchiveManager::cancel_batch ( Batch const &  batch)
protected
void protocols::jd2::archive::ArchiveManager::cancel_batches_previous_to ( core::Size  batch_id,
bool  allow_reading_of_decoys = true 
)
void protocols::jd2::archive::ArchiveManager::finalize_batch ( Batch new_batch,
bool  reread = false 
)
void protocols::jd2::archive::ArchiveManager::go ( ArchiveBaseOP  archive)
void protocols::jd2::archive::ArchiveManager::idle ( )
protected
void protocols::jd2::archive::ArchiveManager::jobs_completed ( )
protected
core::Size protocols::jd2::archive::ArchiveManager::last_batch_id ( ) const
inline
void protocols::jd2::archive::ArchiveManager::queue_batch ( Batch const &  batch)
protected
void protocols::jd2::archive::ArchiveManager::read_existing_batches ( )
protected
void protocols::jd2::archive::ArchiveManager::register_batch ( Batch  new_batch)
protected
void protocols::jd2::archive::ArchiveManager::register_options ( )
static
bool protocols::jd2::archive::ArchiveManager::restore_archive ( )
protected

References theArchive_.

Referenced by go().

void protocols::jd2::archive::ArchiveManager::save_archive ( )
void protocols::jd2::archive::ArchiveManager::send_stop_to_jobdistributor ( )
protected

References queue_batch(), save_archive(), and protocols::jd2::tr().

Referenced by go().

Batch & protocols::jd2::archive::ArchiveManager::start_new_batch ( core::io::silent::SilentStructOPs const &  start_decoys)
Batch & protocols::jd2::archive::ArchiveManager::start_new_batch ( )

Referenced by read_existing_batches().

core::Size protocols::jd2::archive::ArchiveManager::unfinished_batches ( ) const

References batches().

Referenced by go().

Friends And Related Function Documentation

friend class JobDistributorFactory
friend

Member Data Documentation

core::Size const protocols::jd2::archive::ArchiveManager::archive_rank_
private

Referenced by go().

utility::vector1< Batch > protocols::jd2::archive::ArchiveManager::batches_
private
core::Size const protocols::jd2::archive::ArchiveManager::file_buf_rank_
private

Referenced by go(), and jobs_completed().

core::Size const protocols::jd2::archive::ArchiveManager::jd_master_rank_
private

Referenced by cancel_batch(), go(), and queue_batch().

CompletionMessages protocols::jd2::archive::ArchiveManager::jobs_completed_
private
bool protocols::jd2::archive::ArchiveManager::options_registered_
staticprivate

Referenced by ArchiveManager().

core::Size protocols::jd2::archive::ArchiveManager::save_archive_time_interval_
private

specify seconds between automatic saves to filesystem

Referenced by idle().

AbstractArchiveBaseOP protocols::jd2::archive::ArchiveManager::theArchive_
private

The documentation for this class was generated from the following files: