Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
protocols::wum::DatabaseEntryWorkUnit Class Reference

#include <DatabaseEntryWorkUnit.hh>

Inheritance diagram for protocols::wum::DatabaseEntryWorkUnit:
Inheritance graph

Public Member Functions

 DatabaseEntryWorkUnit (utility::sql_database::sessionOP db_session)
 DatabaseEntryWorkUnit (std::map< std::string, std::string > const &row_map)
 ~DatabaseEntryWorkUnit () override=default
protocols::wum::WorkUnitBaseOP clone () const override
std::string result_query_string ()
 Accessor for database query string. More...
- Public Member Functions inherited from protocols::wum::WorkUnitBase
 WorkUnitBase ()
 ~WorkUnitBase () override=default
virtual void clear_serial_data ()
 Remove all data, make sure that the memory is also cleared, hence the cals to reserve. More...
virtual void run ()
 Run the workunit - overloaded by children of this class. More...
void print (std::ostream &out, bool verbose=false) const
 Print header information to the stream, single line by default or verbose if verbose is set to true. More...
core::Size id ()
 Accessor to the ID of the WorkUnit. More...
core::Size extra_data_1 ()
 Accessor to the extra_data_1 and 3 field of the header. More...
core::Size extra_data_2 ()
core::Size extra_data_3 ()
void set_extra_data_1 (core::Size const value)
void set_extra_data_2 (core::Size const value)
void set_extra_data_3 (core::Size const value)
void add_blacklist (int mpi_rank)
 Adds to the blacklist. More...
void clear_blacklist ()
 Erases the blacklist. More...
bool in_blacklist (int mpi_rank)
 Finds in blacklist, true if is, false if it isn't. More...
void set_options (const std::string &text)
 Accesor to the "options" text field. More...
core::Size get_run_time ()
 Returns the differrence between unix start and stop times. More...
std::string get_wu_type () const
 Accessor to header structure, return the WorkUnit Type. More...
void set_wu_type (const std::string &text)
 Accessor to header structure, sets the WorkUnit Type. More...
std::string get_options () const
 Optain the options string from the header. More...
virtual core::Size mem_footprint () const
 Return the memory usage of this WorkUnit. More...
core::Size last_received_from ()

Protected Member Functions

void serialize () override
 Serialize the row_map_. More...
void deserialize () override
 Deserialize the row_map_. More...
- Protected Member Functions inherited from protocols::wum::WorkUnitBase
void create_unique_id ()
 Make a unique number out of Processor Number and unix timestamp ? More...
std::string & serial_data ()
 Accessor to the serial data field. More...
const std::string & serial_data () const
 Accessor to the serial data field. More...
void set_run_start ()
 Set the unixtime of the start of the execution of this WorkUnit. More...
void set_run_stop ()
 Set the unixtime of the stop of the execution of this WorkUnit. More...

Protected Attributes

utility::sql_database::sessionOP db_session_
 The database connection. More...
std::map< std::string,
std::string > 
 map that represents a database row - keys are columns, values are values More...
std::string result_query_string_
 A string that stores the database query you want to run when finished with the work unit. More...
- Protected Attributes inherited from protocols::wum::WorkUnitBase
WU_Header header
 The header data. More...
core::Size last_received_from_
 Contains the serial number of whatever Rank/Node this WU was last receeived from. More...
std::vector< int > blacklist_
 Contains blacklist of nodes. This data is NOT sent, and is only used on the sending side to determine where not to send a workunit. More...

Constructor & Destructor Documentation

protocols::wum::DatabaseEntryWorkUnit::DatabaseEntryWorkUnit ( utility::sql_database::sessionOP  db_session)
protocols::wum::DatabaseEntryWorkUnit::DatabaseEntryWorkUnit ( std::map< std::string, std::string > const &  row_map)
protocols::wum::DatabaseEntryWorkUnit::~DatabaseEntryWorkUnit ( )

Member Function Documentation

protocols::wum::WorkUnitBaseOP protocols::wum::DatabaseEntryWorkUnit::clone ( ) const

Reimplemented from protocols::wum::WorkUnitBase.

void protocols::wum::DatabaseEntryWorkUnit::deserialize ( )
std::string protocols::wum::DatabaseEntryWorkUnit::result_query_string ( )

Accessor for database query string.

References result_query_string_.

void protocols::wum::DatabaseEntryWorkUnit::serialize ( )

Member Data Documentation

utility::sql_database::sessionOP protocols::wum::DatabaseEntryWorkUnit::db_session_

The database connection.

std::string protocols::wum::DatabaseEntryWorkUnit::result_query_string_

A string that stores the database query you want to run when finished with the work unit.

Referenced by deserialize(), result_query_string(), and serialize().

std::map<std::string,std::string> protocols::wum::DatabaseEntryWorkUnit::row_map_

map that represents a database row - keys are columns, values are values

Referenced by deserialize(), and serialize().

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