NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CPSGS_Request Class Reference

Search Toolkit Book for CPSGS_Request

#include "psgs_request.hpp"
(Private to src/app/pubseq_gateway/server.)

+ Collaboration diagram for CPSGS_Request:

Classes

struct  SWaitData
 

Public Types

enum  EPSGS_Type {
  ePSGS_ResolveRequest = 0 , ePSGS_BlobBySeqIdRequest , ePSGS_BlobBySatSatKeyRequest , ePSGS_AnnotationRequest ,
  ePSGS_TSEChunkRequest , ePSGS_AccessionVersionHistoryRequest , ePSGS_IPGResolveRequest , ePSGS_UnknownRequest
}
 

Public Member Functions

 CPSGS_Request ()
 
 ~CPSGS_Request ()
 
 CPSGS_Request (const CHttpRequest &http_request, unique_ptr< SPSGS_RequestBase > req, CRef< CRequestContext > request_context)
 
EPSGS_Type GetRequestType (void) const
 
size_t GetRequestId (void) const
 
void SetBacklogTime (uint64_t val)
 
uint64_t GetBacklogTime (void) const
 
void SetConcurrentProcessorCount (size_t cnt)
 
size_t GetConcurrentProcessorCount (void) const
 
void Lock (const string &event_name)
 
void Unlock (const string &event_name)
 
void WaitFor (const string &event_name, size_t timeout_sec=10)
 
template<typename TRequest >
TRequest & GetRequest (void)
 
CRef< CRequestContextGetRequestContext (void)
 
void SetRequestContext (void)
 
psg_time_point_t GetStartTimestamp (void) const
 
bool NeedTrace (void)
 
bool NeedProcessorEvents (void)
 
int GetHops (void)
 
optional< boolGetIncludeHUP (void)
 
virtual string GetName (void) const
 
virtual CJsonNode Serialize (void) const
 
optional< stringGetWebCubbyUser (void)
 
size_t GetLimitedProcessorCount (void) const
 
void AddLimitedProcessor (const string &name, size_t limit)
 
string GetLimitedProcessorsMessage (void)
 
 CPSGS_Request (const CPSGS_Request &)=default
 
 CPSGS_Request (CPSGS_Request &&)=default
 
CPSGS_Requestoperator= (const CPSGS_Request &)=default
 
CPSGS_Requestoperator= (CPSGS_Request &&)=default
 

Static Public Member Functions

static string TypeToString (EPSGS_Type req_type)
 

Private Attributes

CHttpRequest m_HttpRequest
 
unique_ptr< SPSGS_RequestBasem_Request
 
CRef< CRequestContextm_RequestContext
 
size_t m_RequestId
 
uint64_t m_BacklogTimeMks
 
size_t m_ConcurrentProcessorCount
 
mutex m_WaitLock
 
map< string, SWaitData * > m_Wait
 
vector< pair< string, size_t > > m_LimitedProcessors
 

Detailed Description

Definition at line 107 of file psgs_request.hpp.

Member Enumeration Documentation

◆ EPSGS_Type

Enumerator
ePSGS_ResolveRequest 
ePSGS_BlobBySeqIdRequest 
ePSGS_BlobBySatSatKeyRequest 
ePSGS_AnnotationRequest 
ePSGS_TSEChunkRequest 
ePSGS_AccessionVersionHistoryRequest 
ePSGS_IPGResolveRequest 
ePSGS_UnknownRequest 

Definition at line 110 of file psgs_request.hpp.

Constructor & Destructor Documentation

◆ CPSGS_Request() [1/4]

CPSGS_Request::CPSGS_Request ( )

Definition at line 65 of file psgs_request.cpp.

◆ ~CPSGS_Request()

CPSGS_Request::~CPSGS_Request ( )

◆ CPSGS_Request() [2/4]

CPSGS_Request::CPSGS_Request ( const CHttpRequest http_request,
unique_ptr< SPSGS_RequestBase req,
CRef< CRequestContext request_context 
)

Definition at line 103 of file psgs_request.cpp.

◆ CPSGS_Request() [3/4]

CPSGS_Request::CPSGS_Request ( const CPSGS_Request )
default

◆ CPSGS_Request() [4/4]

CPSGS_Request::CPSGS_Request ( CPSGS_Request &&  )
default

Member Function Documentation

◆ AddLimitedProcessor()

void CPSGS_Request::AddLimitedProcessor ( const string name,
size_t  limit 
)
inline

Definition at line 213 of file psgs_request.hpp.

References m_LimitedProcessors.

◆ GetBacklogTime()

uint64_t CPSGS_Request::GetBacklogTime ( void  ) const
inline

Definition at line 156 of file psgs_request.hpp.

References m_BacklogTimeMks.

◆ GetConcurrentProcessorCount()

size_t CPSGS_Request::GetConcurrentProcessorCount ( void  ) const
inline

Definition at line 166 of file psgs_request.hpp.

References m_ConcurrentProcessorCount.

◆ GetHops()

int CPSGS_Request::GetHops ( void  )

◆ GetIncludeHUP()

optional< bool > CPSGS_Request::GetIncludeHUP ( void  )

◆ GetLimitedProcessorCount()

size_t CPSGS_Request::GetLimitedProcessorCount ( void  ) const
inline

Definition at line 208 of file psgs_request.hpp.

References m_LimitedProcessors.

◆ GetLimitedProcessorsMessage()

string CPSGS_Request::GetLimitedProcessorsMessage ( void  )

Definition at line 344 of file psgs_request.cpp.

References m_LimitedProcessors.

◆ GetName()

string CPSGS_Request::GetName ( void  ) const
virtual

Definition at line 318 of file psgs_request.cpp.

References m_Request.

Referenced by Serialize().

◆ GetRequest()

template<typename TRequest >
TRequest& CPSGS_Request::GetRequest ( void  )
inline

◆ GetRequestContext()

CRef< CRequestContext > CPSGS_Request::GetRequestContext ( void  )

Definition at line 220 of file psgs_request.cpp.

References m_RequestContext.

◆ GetRequestId()

size_t CPSGS_Request::GetRequestId ( void  ) const
inline

Definition at line 146 of file psgs_request.hpp.

References m_RequestId.

◆ GetRequestType()

CPSGS_Request::EPSGS_Type CPSGS_Request::GetRequestType ( void  ) const

◆ GetStartTimestamp()

psg_time_point_t CPSGS_Request::GetStartTimestamp ( void  ) const

Definition at line 236 of file psgs_request.cpp.

References m_Request, and NCBI_THROW.

◆ GetWebCubbyUser()

optional<string> CPSGS_Request::GetWebCubbyUser ( void  )
inline

Definition at line 203 of file psgs_request.hpp.

References CHttpRequest::GetWebCubbyUser(), and m_HttpRequest.

◆ Lock()

void CPSGS_Request::Lock ( const string event_name)

◆ NeedProcessorEvents()

bool CPSGS_Request::NeedProcessorEvents ( void  )

Definition at line 256 of file psgs_request.cpp.

References m_Request, and NCBI_THROW.

◆ NeedTrace()

bool CPSGS_Request::NeedTrace ( void  )

Definition at line 246 of file psgs_request.cpp.

References SPSGS_RequestBase::ePSGS_WithTracing, m_Request, and NCBI_THROW.

◆ operator=() [1/2]

CPSGS_Request& CPSGS_Request::operator= ( const CPSGS_Request )
default

◆ operator=() [2/2]

CPSGS_Request& CPSGS_Request::operator= ( CPSGS_Request &&  )
default

◆ Serialize()

CJsonNode CPSGS_Request::Serialize ( void  ) const
virtual

◆ SetBacklogTime()

void CPSGS_Request::SetBacklogTime ( uint64_t  val)
inline

Definition at line 151 of file psgs_request.hpp.

References m_BacklogTimeMks, and val.

◆ SetConcurrentProcessorCount()

void CPSGS_Request::SetConcurrentProcessorCount ( size_t  cnt)
inline

Definition at line 161 of file psgs_request.hpp.

References cnt, and m_ConcurrentProcessorCount.

◆ SetRequestContext()

void CPSGS_Request::SetRequestContext ( void  )

◆ TypeToString()

static string CPSGS_Request::TypeToString ( EPSGS_Type  req_type)
inlinestatic

◆ Unlock()

void CPSGS_Request::Unlock ( const string event_name)

◆ WaitFor()

void CPSGS_Request::WaitFor ( const string event_name,
size_t  timeout_sec = 10 
)

Member Data Documentation

◆ m_BacklogTimeMks

uint64_t CPSGS_Request::m_BacklogTimeMks
private

Definition at line 230 of file psgs_request.hpp.

Referenced by GetBacklogTime(), Serialize(), and SetBacklogTime().

◆ m_ConcurrentProcessorCount

size_t CPSGS_Request::m_ConcurrentProcessorCount
private

◆ m_HttpRequest

CHttpRequest CPSGS_Request::m_HttpRequest
private

Definition at line 226 of file psgs_request.hpp.

Referenced by GetWebCubbyUser().

◆ m_LimitedProcessors

vector<pair<string, size_t> > CPSGS_Request::m_LimitedProcessors
private

◆ m_Request

unique_ptr<SPSGS_RequestBase> CPSGS_Request::m_Request
private

◆ m_RequestContext

CRef<CRequestContext> CPSGS_Request::m_RequestContext
private

Definition at line 228 of file psgs_request.hpp.

Referenced by GetRequestContext(), and SetRequestContext().

◆ m_RequestId

size_t CPSGS_Request::m_RequestId
private

Definition at line 229 of file psgs_request.hpp.

Referenced by GetRequestId(), and Serialize().

◆ m_Wait

map<string, SWaitData *> CPSGS_Request::m_Wait
private

Definition at line 253 of file psgs_request.hpp.

Referenced by Lock(), Unlock(), WaitFor(), and ~CPSGS_Request().

◆ m_WaitLock

mutex CPSGS_Request::m_WaitLock
private

Definition at line 252 of file psgs_request.hpp.

Referenced by Lock(), Unlock(), and WaitFor().


The documentation for this class was generated from the following files:
Modified on Mon Jun 17 05:04:18 2024 by modify_doxy.py rev. 669887