xrpld
Loading...
Searching...
No Matches
xrpl::JobTypeInfo Class Reference

Holds all the 'static' information about a job, which does not change. More...

#include <JobTypeInfo.h>

Collaboration diagram for xrpl::JobTypeInfo:

Public Member Functions

 JobTypeInfo ()=delete
 JobTypeInfo (JobType type, std::string name, int limit, std::chrono::milliseconds avgLatency, std::chrono::milliseconds peakLatency)
JobType type () const
std::string const & name () const
int limit () const
bool special () const
std::chrono::milliseconds getAverageLatency () const
std::chrono::milliseconds getPeakLatency () const

Private Attributes

JobType const type_
std::string const name_
int const limit_
 The limit on the number of running jobs for this job type.
std::chrono::milliseconds const avgLatency_
 Average and peak latencies for this job type.
std::chrono::milliseconds const peakLatency_

Detailed Description

Holds all the 'static' information about a job, which does not change.

Definition at line 8 of file JobTypeInfo.h.

Constructor & Destructor Documentation

◆ JobTypeInfo() [1/2]

xrpl::JobTypeInfo::JobTypeInfo ( )
delete

◆ JobTypeInfo() [2/2]

xrpl::JobTypeInfo::JobTypeInfo ( JobType type,
std::string name,
int limit,
std::chrono::milliseconds avgLatency,
std::chrono::milliseconds peakLatency )

Definition at line 29 of file JobTypeInfo.h.

Member Function Documentation

◆ type()

JobType xrpl::JobTypeInfo::type ( ) const
nodiscard

Definition at line 44 of file JobTypeInfo.h.

◆ name()

std::string const & xrpl::JobTypeInfo::name ( ) const
nodiscard

Definition at line 50 of file JobTypeInfo.h.

◆ limit()

int xrpl::JobTypeInfo::limit ( ) const
nodiscard

Definition at line 56 of file JobTypeInfo.h.

◆ special()

bool xrpl::JobTypeInfo::special ( ) const
nodiscard

Definition at line 62 of file JobTypeInfo.h.

◆ getAverageLatency()

std::chrono::milliseconds xrpl::JobTypeInfo::getAverageLatency ( ) const
nodiscard

Definition at line 68 of file JobTypeInfo.h.

◆ getPeakLatency()

std::chrono::milliseconds xrpl::JobTypeInfo::getPeakLatency ( ) const
nodiscard

Definition at line 74 of file JobTypeInfo.h.

Member Data Documentation

◆ type_

JobType const xrpl::JobTypeInfo::type_
private

Definition at line 11 of file JobTypeInfo.h.

◆ name_

std::string const xrpl::JobTypeInfo::name_
private

Definition at line 12 of file JobTypeInfo.h.

◆ limit_

int const xrpl::JobTypeInfo::limit_
private

The limit on the number of running jobs for this job type.

A limit of 0 marks this as a "special job" which is not dispatched via the job queue.

Definition at line 19 of file JobTypeInfo.h.

◆ avgLatency_

std::chrono::milliseconds const xrpl::JobTypeInfo::avgLatency_
private

Average and peak latencies for this job type.

0 is none specified

Definition at line 22 of file JobTypeInfo.h.

◆ peakLatency_

std::chrono::milliseconds const xrpl::JobTypeInfo::peakLatency_
private

Definition at line 23 of file JobTypeInfo.h.