RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
Public Member Functions | List of all members
rstudio::launcher_plugins::jobs::AbstractJobRepository Class Referenceabstract

Stores any jobs currently in the job scheduling system. More...

#include <AbstractJobRepository.hpp>

Inheritance diagram for rstudio::launcher_plugins::jobs::AbstractJobRepository:
rstudio::launcher_plugins::Noncopyable rstudio::launcher_plugins::local::LocalJobRepository rstudio::launcher_plugins::quickstart::QuickStartJobRepository

Public Member Functions

 AbstractJobRepository (JobStatusNotifierPtr in_jobStatusNotifier)
 Constructor. More...
 
virtual ~AbstractJobRepository ()=default
 Virtual Destructor, to allow for inheritance, if necessary.
 
void addJob (const api::JobPtr &in_job)
 Adds the job to the repository. More...
 
api::JobPtr getJob (const std::string &in_jobId, const system::User &in_user=system::User()) const
 Gets the specified job for the specified user from the repository. More...
 
api::JobList getJobs (const system::User &in_use=system::User()) const
 Gets all jobs belonging to the specified user. More...
 
Error initialize ()
 Initializes the AbstractJobRepository. More...
 
void removeJob (const std::string &in_jobId)
 Removes a job from the repository. More...
 
- Public Member Functions inherited from rstudio::launcher_plugins::Noncopyable
 Noncopyable ()=default
 Default constructor.
 
 Noncopyable (const Noncopyable &)=delete
 Deleted copy constructor.
 
Noncopyableoperator= (const Noncopyable &)=delete
 Deleted assignment operator.
 

Detailed Description

Stores any jobs currently in the job scheduling system.

Constructor & Destructor Documentation

◆ AbstractJobRepository()

rstudio::launcher_plugins::jobs::AbstractJobRepository::AbstractJobRepository ( JobStatusNotifierPtr  in_jobStatusNotifier)
explicit

Constructor.

Parameters
in_jobStatusNotifierThe job status notifier. Used to add new jobs.

Member Function Documentation

◆ addJob()

void rstudio::launcher_plugins::jobs::AbstractJobRepository::addJob ( const api::JobPtr &  in_job)

Adds the job to the repository.

If the job is already in the repository, nothing will happen.

Parameters
in_jobThe job to add to the repository.

◆ getJob()

api::JobPtr rstudio::launcher_plugins::jobs::AbstractJobRepository::getJob ( const std::string &  in_jobId,
const system::User in_user = system::User() 
) const

Gets the specified job for the specified user from the repository.

If the job does not belong to the specified user and if the user does not represent "all users", no job will be returned.

Parameters
in_jobIdThe ID of the job to retrieve.
in_userThe user requesting the job. Default: All users.
Returns
The Job, if it could be found; an empty pointer otherwise.

◆ getJobs()

api::JobList rstudio::launcher_plugins::jobs::AbstractJobRepository::getJobs ( const system::User in_use = system::User()) const

Gets all jobs belonging to the specified user.

If the user object represents "all users", all jobs will be returned.

Parameters
in_userThe user for whom to retrieve all jobs. Default: All users.
Returns
All of the jobs belonging to the specified user.

◆ initialize()

Error rstudio::launcher_plugins::jobs::AbstractJobRepository::initialize ( )

Initializes the AbstractJobRepository.

Returns
Success if the repository could be initialized; Error otherwise.

◆ removeJob()

void rstudio::launcher_plugins::jobs::AbstractJobRepository::removeJob ( const std::string &  in_jobId)

Removes a job from the repository.

If there is no job with the specified id, nothing will happen.

Parameters
in_jobIdThe ID of the job to remove.

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