Search Toolkit Book for CPSGS_WGSProcessor
#include "wgs_processor.hpp"
(Private to src/app/pubseq_gateway/server
.)
Definition at line 61 of file wgs_processor.hpp.
◆ EOutputFormat ◆ TBioseqInfoFlags ◆ TBlobIds ◆ TID2ChunkId ◆ CPSGS_WGSProcessor() [1/2] CPSGS_WGSProcessor::CPSGS_WGSProcessor ( void ) ◆ ~CPSGS_WGSProcessor() CPSGS_WGSProcessor::~CPSGS_WGSProcessor ( void ) override ◆ CPSGS_WGSProcessor() [2/2] ◆ Cancel() void CPSGS_WGSProcessor::Cancel ( void ) overridevirtual ◆ CanProcess()Tells if processor can process the given request.
Reimplemented from IPSGS_Processor.
Definition at line 286 of file wgs_processor.cpp.
References _ASSERT, m_Client, x_InitClient(), and x_IsEnabled().
◆ CreateProcessor() ◆ GetBlobByBlobId() void CPSGS_WGSProcessor::GetBlobByBlobId ( void ) ◆ GetBlobBySeqId() void CPSGS_WGSProcessor::GetBlobBySeqId ( void )Definition at line 525 of file wgs_processor.cpp.
References SWGSData::eResult_Found, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_Client, m_ExcludedBlobs, m_SeqId, m_WGSData, m_WGSDataError, IPSGS_Processor::PostponeInvoke(), s_OnGotBlobBySeqId(), string, x_CheckExcludedCache(), and x_WaitForOtherProcessors().
Referenced by CWGSThreadPoolTask_GetBlobBySeqId::Execute().
◆ GetChunk() void CPSGS_WGSProcessor::GetChunk ( void )Definition at line 709 of file wgs_processor.cpp.
References IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_ChunkId, m_Client, m_Id2Info, m_WGSData, m_WGSDataError, NStr::NumericToString(), IPSGS_Processor::PostponeInvoke(), s_OnGotChunk(), and string.
Referenced by CWGSThreadPoolTask_GetChunk::Execute().
◆ GetGroupName() string CPSGS_WGSProcessor::GetGroupName ( void ) const overridevirtualTells the processor group name.
For example, all the processors which retrieve data from Cassandra should return the same name in response to this call. This name is used to control the total number of simultaneously working processors retrieving from the same backend.
Implements IPSGS_Processor.
Definition at line 316 of file wgs_processor.cpp.
References kWGSProcessorGroupName.
◆ GetName() string CPSGS_WGSProcessor::GetName ( void ) const overridevirtual ◆ GetPSGId2Info() ◆ GetStatus() ◆ OnGotBlobByBlobId() void CPSGS_WGSProcessor::OnGotBlobByBlobId ( void )Definition at line 642 of file wgs_processor.cpp.
References eBlobRetrieve, IPSGS_Processor::ePSGS_Done, IPSGS_Processor::ePSGS_Error, IPSGS_Processor::ePSGS_NotFound, SWGSData::eResult_NotFound, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_PSGBlobId, m_WGSData, m_WGSDataError, s_SimulateError(), x_Finish(), x_IsCanceled(), x_RegisterTimingNotFound(), x_SendBlob(), x_SendError(), and x_SignalStartProcessing().
◆ OnGotBlobBySeqId() void CPSGS_WGSProcessor::OnGotBlobBySeqId ( void )Definition at line 553 of file wgs_processor.cpp.
References eBlobRetrieve, IPSGS_Processor::ePSGS_Done, IPSGS_Processor::ePSGS_Error, IPSGS_Processor::ePSGS_NotFound, SWGSData::eResult_NotFound, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_SeqId, m_WGSData, m_WGSDataError, s_SimulateError(), x_Finish(), x_IsCanceled(), x_RegisterTimingNotFound(), x_SendBioseqInfo(), x_SendBlob(), x_SendError(), and x_SignalStartProcessing().
◆ OnGotChunk() void CPSGS_WGSProcessor::OnGotChunk ( void )Definition at line 729 of file wgs_processor.cpp.
References IPSGS_Processor::ePSGS_Done, IPSGS_Processor::ePSGS_Error, IPSGS_Processor::ePSGS_NotFound, SWGSData::eResult_NotFound, eTseChunkRetrieve, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_ChunkId, m_Id2Info, m_WGSData, m_WGSDataError, NStr::NumericToString(), s_SimulateError(), x_Finish(), x_IsCanceled(), x_RegisterTimingNotFound(), x_SendChunk(), x_SendError(), x_SendForbidden(), and x_SignalStartProcessing().
◆ OnResolvedSeqId() void CPSGS_WGSProcessor::OnResolvedSeqId ( void )Definition at line 439 of file wgs_processor.cpp.
References IPSGS_Processor::ePSGS_Done, IPSGS_Processor::ePSGS_Error, IPSGS_Processor::ePSGS_NotFound, SWGSData::eResult_NotFound, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_SeqId, m_WGSData, m_WGSDataError, s_SimulateError(), string, x_Finish(), x_IsCanceled(), x_SendBioseqInfo(), x_SendError(), and x_SignalStartProcessing().
◆ Process() void CPSGS_WGSProcessor::Process ( void ) overridevirtualMain processing function.
It should avoid throwing exceptions. In case of errors it must make sure that:
Implements IPSGS_Processor.
Definition at line 322 of file wgs_processor.cpp.
References CPSGS_Request::ePSGS_BlobBySatSatKeyRequest, CPSGS_Request::ePSGS_BlobBySeqIdRequest, IPSGS_Processor::ePSGS_Error, CPSGS_Request::ePSGS_ResolveRequest, CPSGS_Request::ePSGS_TSEChunkRequest, IPSGS_Processor::GetRequest(), kWGSProcessorEvent, m_Mutex, IPSGS_Processor::m_Request, m_Unlocked, x_Finish(), x_IsCanceled(), x_ProcessBlobBySatSatKeyRequest(), x_ProcessBlobBySeqIdRequest(), x_ProcessResolveRequest(), x_ProcessTSEChunkRequest(), and x_SendError().
◆ ResolveSeqId() void CPSGS_WGSProcessor::ResolveSeqId ( void )Definition at line 418 of file wgs_processor.cpp.
References IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, m_Client, m_SeqId, m_WGSData, m_WGSDataError, IPSGS_Processor::PostponeInvoke(), s_OnResolvedSeqId(), string, and x_WaitForOtherProcessors().
Referenced by CWGSThreadPoolTask_ResolveSeqId::Execute().
◆ x_CheckExcludedCache() bool CPSGS_WGSProcessor::x_CheckExcludedCache ( void ) private ◆ x_Finish()Definition at line 1131 of file wgs_processor.cpp.
References _ASSERT, IPSGS_Processor::ePSGS_InProgress, m_AddedToExcludedCache, m_Status, IPSGS_Processor::SignalFinishProcessing(), x_RemoveFromExcludedCache(), and x_UnlockRequest().
Referenced by Cancel(), OnGotBlobByBlobId(), OnGotBlobBySeqId(), OnGotChunk(), OnResolvedSeqId(), Process(), x_IsCanceled(), x_ProcessBlobBySeqIdRequest(), x_ProcessResolveRequest(), and x_SignalStartProcessing().
◆ x_GetBlobState() ◆ x_GetOutputFormat() ◆ x_InitClient() void CPSGS_WGSProcessor::x_InitClient ( void ) const inlineprivate ◆ x_IsCanceled() bool CPSGS_WGSProcessor::x_IsCanceled ( ) private ◆ x_IsEnabled() ◆ x_LoadConfig() void CPSGS_WGSProcessor::x_LoadConfig ( void ) privateDefinition at line 262 of file wgs_processor.cpp.
References DEFAULT_COMPRESS_DATA, DEFAULT_FILE_RECHECK_TIME, DEFAULT_FILE_REOPEN_TIME, DEFAULT_INDEX_UPDATE_TIME, DEFAULT_VDB_CACHE_SIZE, SWGSProcessor_Config::eCompressData_always, SWGSProcessor_Config::eCompressData_never, CPubseqGatewayApp::GetInstance(), IRegistry::GetInt(), kDefaultMaxConn, kMax_UInt, kParamMaxConn, kWGSProcessorSection, m_Config, m_ThreadPool, min(), PARAM_COMPRESS_DATA, PARAM_FILE_RECHECK_TIME, PARAM_FILE_REOPEN_TIME, PARAM_INDEX_UPDATE_TIME, PARAM_VDB_CACHE_SIZE, and registry.
Referenced by CPSGS_WGSProcessor().
◆ x_ProcessBlobBySatSatKeyRequest() void CPSGS_WGSProcessor::x_ProcessBlobBySatSatKeyRequest ( void ) private ◆ x_ProcessBlobBySeqIdRequest() void CPSGS_WGSProcessor::x_ProcessBlobBySeqIdRequest ( void ) privateDefinition at line 492 of file wgs_processor.cpp.
References IPSGS_Processor::ePSGS_Error, SPSGS_BlobRequestBase::ePSGS_NoneTSE, ePSGS_ParsedOK, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, SPSGS_BlobRequestBase::m_ClientId, m_ClientId, SPSGS_BlobBySeqIdRequest::m_ExcludeBlobs, m_ExcludedBlobs, SPSGS_BlobBySeqIdRequest::m_ResendTimeoutMks, m_ResendTimeoutMks, SPSGS_BlobBySeqIdRequest::m_SeqId, m_SeqId, SPSGS_BlobBySeqIdRequest::m_SeqIdType, m_ThreadPool, SPSGS_BlobRequestBase::m_TSEOption, IPSGS_Processor::ParseInputSeqId(), PSG_ERROR, CRef< C, Locker >::Reset(), and x_Finish().
Referenced by Process().
◆ x_ProcessResolveRequest() void CPSGS_WGSProcessor::x_ProcessResolveRequest ( void ) privateDefinition at line 398 of file wgs_processor.cpp.
References IPSGS_Processor::ePSGS_Error, ePSGS_ParsedOK, IPSGS_Processor::GetReply(), IPSGS_Processor::GetRequest(), kWGSProcessorName, SPSGS_ResolveRequest::m_OutputFormat, m_OutputFormat, SPSGS_ResolveRequest::m_SeqId, m_SeqId, SPSGS_ResolveRequest::m_SeqIdType, m_ThreadPool, IPSGS_Processor::ParseInputSeqId(), PSG_ERROR, CRef< C, Locker >::Reset(), and x_Finish().
Referenced by Process().
◆ x_ProcessTSEChunkRequest() void CPSGS_WGSProcessor::x_ProcessTSEChunkRequest ( void ) private ◆ x_RegisterTiming() ◆ x_RegisterTimingFound() ◆ x_RegisterTimingNotFound() void CPSGS_WGSProcessor::x_RegisterTimingNotFound ( EPSGOperation operation ) private ◆ x_RemoveFromExcludedCache() void CPSGS_WGSProcessor::x_RemoveFromExcludedCache ( void ) private ◆ x_SendBioseqInfo() void CPSGS_WGSProcessor::x_SendBioseqInfo ( void ) private ◆ x_SendBlob() void CPSGS_WGSProcessor::x_SendBlob ( void ) privateDefinition at line 1002 of file wgs_processor.cpp.
References ePSGS_BlobExcluded, ePSGS_BlobInProgress, SWGSData::eResult_Excluded, SWGSData::eResult_InProgress, SWGSData::eResult_Sent, GetName(), IPSGS_Processor::GetReply(), m_ResendTimeoutMks, m_SentMksAgo, m_WGSData, x_SendForbidden(), x_SendMainEntry(), x_SendSplitInfo(), and x_SetExcludedCacheCompleted().
Referenced by OnGotBlobByBlobId(), and OnGotBlobBySeqId().
◆ x_SendBlobData() void CPSGS_WGSProcessor::x_SendBlobData ( const string & psg_blob_id, const objects::CID2_Reply_Data & data ) private ◆ x_SendBlobForbidden() void CPSGS_WGSProcessor::x_SendBlobForbidden ( const string & psg_blob_id ) private ◆ x_SendBlobProps() ◆ x_SendChunk() void CPSGS_WGSProcessor::x_SendChunk ( void ) privateDefinition at line 1033 of file wgs_processor.cpp.
References _ASSERT, data, eTseChunkRetrieve, GetPSGId2Info(), m_ChunkId, m_WGSData, s_SetBlobDataProps(), x_RegisterTimingFound(), x_SendChunkBlobData(), x_SendChunkBlobProps(), and x_WriteData().
Referenced by OnGotChunk().
◆ x_SendChunkBlobData() ◆ x_SendChunkBlobProps() ◆ x_SendError() [1/4] void CPSGS_WGSProcessor::x_SendError ( const string & msg ) private ◆ x_SendError() [2/4] void CPSGS_WGSProcessor::x_SendError ( const string & msg, const exception & exc ) private ◆ x_SendError() [3/4] ◆ x_SendError() [4/4] ◆ x_SendForbidden() void CPSGS_WGSProcessor::x_SendForbidden ( void ) private ◆ x_SendMainEntry() void CPSGS_WGSProcessor::x_SendMainEntry ( void ) privateDefinition at line 970 of file wgs_processor.cpp.
References _ASSERT, data, eBlobRetrieve, m_WGSData, s_SetBlobDataProps(), s_SetBlobState(), s_SetBlobVersion(), x_RegisterTimingFound(), x_SendBlobData(), x_SendBlobProps(), and x_WriteData().
Referenced by x_SendBlob().
◆ x_SendResult() ◆ x_SendSplitInfo() void CPSGS_WGSProcessor::x_SendSplitInfo ( void ) privateDefinition at line 945 of file wgs_processor.cpp.
References data, eBlobRetrieve, GetPSGId2Info(), kSplitInfoChunk, m_WGSData, s_SetBlobDataProps(), s_SetBlobState(), s_SetBlobVersion(), CBlobRecord::SetId2Info(), x_RegisterTimingFound(), x_SendBlobProps(), x_SendChunkBlobData(), x_SendChunkBlobProps(), and x_WriteData().
Referenced by x_SendBlob().
◆ x_SetExcludedCacheCompleted() void CPSGS_WGSProcessor::x_SetExcludedCacheCompleted ( void ) private ◆ x_SignalStartProcessing() bool CPSGS_WGSProcessor::x_SignalStartProcessing ( void ) private ◆ x_UnlockRequest() void CPSGS_WGSProcessor::x_UnlockRequest ( void ) private ◆ x_WaitForOtherProcessors() void CPSGS_WGSProcessor::x_WaitForOtherProcessors ( void ) private ◆ x_WriteData() void CPSGS_WGSProcessor::x_WriteData ( objects::CID2_Reply_Data & data, const objects::CAsnBinData & obj, bool compress ) const privateDefinition at line 1051 of file wgs_processor.cpp.
References compress, data, CID2_Reply_Data_Base::eData_compression_gzip, CID2_Reply_Data_Base::eData_compression_none, CID2_Reply_Data_Base::eData_format_asn_binary, ICompression::eLevel_Lowest, eNoOwnership, CCompressionStream::fOwnProcessor, CAsnBinData::Serialize(), and str().
Referenced by x_SendChunk(), x_SendMainEntry(), and x_SendSplitInfo().
◆ m_AddedToExcludedCache bool CPSGS_WGSProcessor::m_AddedToExcludedCache = false private ◆ m_Canceled bool CPSGS_WGSProcessor::m_Canceled private ◆ m_ChunkId int64_t CPSGS_WGSProcessor::m_ChunkId private ◆ m_Client shared_ptr<CWGSClient> CPSGS_WGSProcessor::m_Client mutableprivate ◆ m_ClientId string CPSGS_WGSProcessor::m_ClientId private ◆ m_Config ◆ m_ExcludedBlobs TBlobIds CPSGS_WGSProcessor::m_ExcludedBlobs private ◆ m_Id2Info string CPSGS_WGSProcessor::m_Id2Info private ◆ m_Mutex ◆ m_OutputFormat ◆ m_PSGBlobId string CPSGS_WGSProcessor::m_PSGBlobId private ◆ m_ResendTimeoutMks unsigned long CPSGS_WGSProcessor::m_ResendTimeoutMks = 0 private ◆ m_SentMksAgo unsigned long CPSGS_WGSProcessor::m_SentMksAgo = 0 private ◆ m_SeqId CRef<objects::CSeq_id> CPSGS_WGSProcessor::m_SeqId private ◆ m_Start ◆ m_Status ◆ m_ThreadPool shared_ptr<ncbi::CThreadPool> CPSGS_WGSProcessor::m_ThreadPool private ◆ m_Unlocked bool CPSGS_WGSProcessor::m_Unlocked private ◆ m_WGSData shared_ptr<SWGSData> CPSGS_WGSProcessor::m_WGSData privateDefinition at line 181 of file wgs_processor.hpp.
Referenced by GetBlobByBlobId(), GetBlobBySeqId(), GetChunk(), OnGotBlobByBlobId(), OnGotBlobBySeqId(), OnGotChunk(), OnResolvedSeqId(), ResolveSeqId(), x_CheckExcludedCache(), x_RemoveFromExcludedCache(), x_SendBioseqInfo(), x_SendBlob(), x_SendChunk(), x_SendForbidden(), x_SendMainEntry(), x_SendSplitInfo(), and x_SetExcludedCacheCompleted().
◆ m_WGSDataError string CPSGS_WGSProcessor::m_WGSDataError privateThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4