NCBI C++ ToolKit
psgs_reply.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: psgs_reply.cpp 101848 2024-02-22 13:57:25Z satskyse $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Sergey Satskiy
27  *
28  * File Description:
29  *
30  */
31 
32 
33 #include <ncbi_pch.hpp>
34 
35 #include "pending_operation.hpp"
36 #include "http_reply.hpp"
37 #include "psgs_reply.hpp"
38 #include "pubseq_gateway_utils.hpp"
39 #include "cass_fetch.hpp"
40 
41 
43 {
44  if (m_ReplyOwned) {
45  delete m_Reply;
46  }
47 }
48 
49 
51 {
52  m_ConnectionCanceled = true;
54 }
55 
56 
58 {
60  return;
61 
62  lock_guard<mutex> guard(m_ChunksLock);
64 
65  if (!m_Reply->IsOutputReady()) {
66  return;
67  }
68 
69  if (how == ePSGS_SendAccumulated) {
70  // Only chunks
71  if (m_Chunks.empty()) {
72  // There is nothing to send
73  return;
74  }
75 
76  // false => not last; do not finish the stream
77  m_Reply->Send(m_Chunks, false);
78  } else {
79  // Chunks (if any) + set end of stream
80  // true => the last; finish the stream
81  m_Reply->Send(m_Chunks, true);
82  }
83 
84  m_Chunks.clear();
85 }
86 
88 {
91 }
92 
93 
94 bool CPSGS_Reply::IsCompleted(void) const
95 {
96  return m_Reply->IsCompleted();
97 }
98 
99 
100 bool CPSGS_Reply::IsFinished(void) const
101 {
102  return m_Reply->IsFinished();
103 }
104 
105 
107 {
108  return m_Reply->IsOutputReady();
109 }
110 
111 
112 bool CPSGS_Reply::IsClosed(void) const
113 {
114  return m_Reply->IsClosed();
115 }
116 
117 void CPSGS_Reply:: SetRequestId(size_t request_id)
118 {
119  m_RequestId = request_id;
120  m_Reply->SetRequestId(request_id);
121 }
122 
123 
125 {
126  lock_guard<mutex> guard(m_ChunksLock);
128 
129  m_Chunks.clear();
130  m_Reply = nullptr;
132 }
133 
134 
135 shared_ptr<idblob::CCassDataCallbackReceiver> CPSGS_Reply::GetDataReadyCB(void)
136 {
137  return m_Reply->GetDataReadyCB();
138 }
139 
140 
142 {
143  // This call does not access the lower level structures
144  // so it is safe to set the content type without checking that the
145  // connection is canceled or closed
146  m_Reply->SetContentType(mime_type);
147 }
148 
149 
151 {
153  return;
154  m_Reply->SetContentLength(content_length);
155 }
156 
157 
158 size_t CPSGS_Reply::GetBytesSent(void) const
159 {
160  if (m_Reply)
161  return m_Reply->GetBytesSent();
162  return 0;
163 }
164 
165 
166 void CPSGS_Reply::SendOk(const char * payload, size_t payload_len, bool is_persist)
167 {
169  return;
170 
172 
173  m_Reply->SendOk(payload, payload_len, is_persist);
174 
175  // OK is always the last so the reply is not needed anymore.
176  // SetCompleted() will let the framework to know that the pending op can be
177  // discarded.
178  // Typically this method would be used without the pending op so
179  // SetCompleted() would not be needed but it does not harm in those cases.
181 }
182 
183 
184 void CPSGS_Reply::Send202(const char * payload, size_t payload_len)
185 {
187  return;
188 
190 
191  m_Reply->Send202(payload, payload_len);
192 
193  // 202 is always the last so the reply is not needed anymore.
194  // SetCompleted() will let the framework to know that the pending op can be
195  // discarded.
196  // Typically this method would be used without the pending op so
197  // SetCompleted() would not be needed but it does not harm in those cases.
199 }
200 
201 
202 void CPSGS_Reply::Send400(const char * payload)
203 {
205  return;
206 
208 
209  m_Reply->Send400(payload);
210 
211  // 400 is always the last so the reply is not needed anymore.
212  // SetCompleted() will let the framework to know that the pending op can be
213  // discarded.
214  // Typically this method would be used without the pending op so
215  // SetCompleted() would not be needed but it does not harm in those cases.
217 }
218 
219 
220 void CPSGS_Reply::Send401(const char * payload)
221 {
223  return;
224 
226 
227  m_Reply->Send401(payload);
228 
229  // 401 is always the last so the reply is not needed anymore.
230  // SetCompleted() will let the framework to know that the pending op can be
231  // discarded.
232  // Typically this method would be used without the pending op so
233  // SetCompleted() would not be needed but it does not harm in those cases.
235 }
236 
237 
238 void CPSGS_Reply::Send404(const char * payload)
239 {
241  return;
242 
244 
245  m_Reply->Send404(payload);
246 
247  // 404 is always the last so the reply is not needed anymore.
248  // SetCompleted() will let the framework to know that the pending op can be
249  // discarded.
250  // Typically this method would be used without the pending op so
251  // SetCompleted() would not be needed but it does not harm in those cases.
253 }
254 
255 
256 void CPSGS_Reply::Send409(const char * payload)
257 {
259  return;
260 
262 
263  m_Reply->Send409(payload);
264 
265  // 409 is always the last so the reply is not needed anymore.
266  // SetCompleted() will let the framework to know that the pending op can be
267  // discarded.
268  // Typically this method would be used without the pending op so
269  // SetCompleted() would not be needed but it does not harm in those cases.
271 }
272 
273 
274 void CPSGS_Reply::Send500(const char * payload)
275 {
277  return;
278 
280 
281  m_Reply->Send500(payload);
282 
283  // 500 is always the last so the reply is not needed anymore.
284  // SetCompleted() will let the framework to know that the pending op can be
285  // discarded.
286  // Typically this method would be used without the pending op so
287  // SetCompleted() would not be needed but it does not harm in those cases.
289 }
290 
291 
292 void CPSGS_Reply::Send502(const char * payload)
293 {
295  return;
296 
298 
299  m_Reply->Send502(payload);
300 
301  // 502 is always the last so the reply is not needed anymore.
302  // SetCompleted() will let the framework to know that the pending op can be
303  // discarded.
304  // Typically this method would be used without the pending op so
305  // SetCompleted() would not be needed but it does not harm in those cases.
307 }
308 
309 
310 void CPSGS_Reply::Send503(const char * payload)
311 {
313  return;
314 
316 
317  m_Reply->Send503(payload);
318 
319  // 503 is always the last so the reply is not needed anymore.
320  // SetCompleted() will let the framework to know that the pending op can be
321  // discarded.
322  // Typically this method would be used without the pending op so
323  // SetCompleted() would not be needed but it does not harm in those cases.
325 }
326 
327 
329  const string & processor_id,
330  const string & msg,
331  CRequestStatus::ECode status,
332  int err_code,
333  EDiagSev severity)
334 {
336  return;
337 
338  string header = GetBioseqMessageHeader(item_id, processor_id,
339  msg.size(), status,
340  err_code, severity);
341 
342  lock_guard<mutex> guard(m_ChunksLock);
344 
345  m_Chunks.push_back(m_Reply->PrepareChunk(
346  (const unsigned char *)(header.data()), header.size()));
347  m_Chunks.push_back(m_Reply->PrepareChunk(
348  (const unsigned char *)(msg.data()), msg.size()));
350 }
351 
352 
353 
355  size_t item_id,
356  const string & processor_id,
357  const string & content,
359 {
361  return;
362 
363  string header = GetBioseqInfoHeader(item_id, processor_id,
364  content.size(), output_format);
365 
366  lock_guard<mutex> guard(m_ChunksLock);
368 
369  m_Chunks.push_back(m_Reply->PrepareChunk(
370  (const unsigned char *)(header.data()), header.size()));
371  m_Chunks.push_back(m_Reply->PrepareChunk(
372  (const unsigned char *)(content.data()), content.size()));
374 }
375 
376 
378  const string & processor_id,
379  size_t chunk_count)
380 {
382  return;
383 
384  string bioseq_meta = GetBioseqCompletionHeader(item_id,
385  processor_id,
386  chunk_count);
387 
388  lock_guard<mutex> guard(m_ChunksLock);
390 
391  m_Chunks.push_back(m_Reply->PrepareChunk(
392  (const unsigned char *)(bioseq_meta.data()),
393  bioseq_meta.size()));
395 }
396 
397 
399  const string & processor_id,
400  const string & msg,
401  CRequestStatus::ECode status,
402  int err_code,
403  EDiagSev severity)
404 {
406  return;
407 
408  string header = GetBlobPropMessageHeader(item_id, processor_id,
409  msg.size(), status, err_code,
410  severity);
411 
412  lock_guard<mutex> guard(m_ChunksLock);
414 
415  m_Chunks.push_back(m_Reply->PrepareChunk(
416  (const unsigned char *)(header.data()), header.size()));
417  m_Chunks.push_back(m_Reply->PrepareChunk(
418  (const unsigned char *)(msg.data()), msg.size()));
420 }
421 
422 
424  const string & processor_id,
425  int64_t id2_chunk,
426  const string & id2_info,
427  const string & msg,
428  CRequestStatus::ECode status,
429  int err_code,
430  EDiagSev severity)
431 {
433  return;
434 
435  string header = GetTSEBlobPropMessageHeader(
436  item_id, processor_id, id2_chunk, id2_info,
437  msg.size(), status, err_code, severity);
438 
439  lock_guard<mutex> guard(m_ChunksLock);
441 
442  m_Chunks.push_back(m_Reply->PrepareChunk(
443  (const unsigned char *)(header.data()), header.size()));
444  m_Chunks.push_back(m_Reply->PrepareChunk(
445  (const unsigned char *)(msg.data()), msg.size()));
447 }
448 
449 
451  const string & processor_id,
452  const string & msg,
453  CRequestStatus::ECode status,
454  int err_code,
455  EDiagSev severity)
456 {
458  return;
459 
460  PrepareBlobPropMessage(fetch_details->GetBlobPropItemId(this),
461  processor_id, msg, status, err_code, severity);
462  fetch_details->IncrementTotalSentBlobChunks();
463 }
464 
465 
467  const string & processor_id,
468  int64_t id2_chunk,
469  const string & id2_info,
470  const string & msg,
471  CRequestStatus::ECode status,
472  int err_code,
473  EDiagSev severity)
474 {
476  return;
477 
478  x_PrepareTSEBlobPropMessage(fetch_details->GetBlobPropItemId(this),
479  processor_id, id2_chunk, id2_info, msg,
480  status, err_code, severity);
481  fetch_details->IncrementTotalSentBlobChunks();
482 }
483 
484 
486  const string & processor_id,
487  const string & blob_id,
488  const string & content,
489  CBlobRecord::TTimestamp last_modified)
490 {
492  return;
493 
494  string header = GetBlobPropHeader(item_id, processor_id, blob_id,
495  content.size(), last_modified);
496 
497  lock_guard<mutex> guard(m_ChunksLock);
499 
500  m_Chunks.push_back(m_Reply->PrepareChunk(
501  (const unsigned char *)(header.data()), header.size()));
502  m_Chunks.push_back(m_Reply->PrepareChunk(
503  (const unsigned char *)(content.data()),
504  content.size()));
506 }
507 
508 
510  const string & processor_id,
511  const string & content,
512  CBlobRecord::TTimestamp last_modified)
513 {
515  return;
516 
517  PrepareBlobPropData(fetch_details->GetBlobPropItemId(this),
518  processor_id,
519  fetch_details->GetBlobId().ToString(),
520  content,
521  last_modified);
522  fetch_details->IncrementTotalSentBlobChunks();
523 }
524 
525 
527  const string & processor_id,
528  int64_t id2_chunk,
529  const string & id2_info,
530  const string & content)
531 {
533  return;
534 
535  PrepareTSEBlobPropData(fetch_details->GetBlobPropItemId(this),
536  processor_id, id2_chunk, id2_info, content);
537  fetch_details->IncrementTotalSentBlobChunks();
538 }
539 
540 
542  const string & processor_id,
543  int64_t id2_chunk,
544  const string & id2_info,
545  const string & content)
546 {
548  return;
549 
550  string header = GetTSEBlobPropHeader(item_id,
551  processor_id,
552  id2_chunk, id2_info,
553  content.size());
554 
555  lock_guard<mutex> guard(m_ChunksLock);
557 
558  m_Chunks.push_back(m_Reply->PrepareChunk(
559  (const unsigned char *)(header.data()), header.size()));
560  m_Chunks.push_back(m_Reply->PrepareChunk(
561  (const unsigned char *)(content.data()),
562  content.size()));
564 }
565 
566 
567 void CPSGS_Reply::PrepareBlobData(size_t item_id,
568  const string & processor_id,
569  const string & blob_id,
570  const unsigned char * chunk_data,
571  unsigned int data_size,
572  int chunk_no,
573  CBlobRecord::TTimestamp last_modified)
574 {
576  return;
577 
579 
580  string header = GetBlobChunkHeader(item_id, processor_id, blob_id,
581  data_size, chunk_no, last_modified);
582 
583  lock_guard<mutex> guard(m_ChunksLock);
585 
586  m_Chunks.push_back(m_Reply->PrepareChunk(
587  (const unsigned char *)(header.data()),
588  header.size()));
589 
590  if (data_size > 0 && chunk_data != nullptr)
591  m_Chunks.push_back(m_Reply->PrepareChunk(chunk_data, data_size));
592 }
593 
594 
596  const string & processor_id,
597  const unsigned char * chunk_data,
598  unsigned int data_size,
599  int chunk_no,
600  CBlobRecord::TTimestamp last_modified)
601 {
603  return;
604 
605  fetch_details->IncrementTotalSentBlobChunks();
606  PrepareBlobData(fetch_details->GetBlobChunkItemId(this),
607  processor_id,
608  fetch_details->GetBlobId().ToString(),
609  chunk_data, data_size, chunk_no,
610  last_modified);
611 }
612 
613 
615  const string & processor_id,
616  const unsigned char * chunk_data,
617  unsigned int data_size,
618  int chunk_no,
619  int64_t id2_chunk,
620  const string & id2_info)
621 {
623  return;
624 
626 
627  string header = GetTSEBlobChunkHeader(item_id, processor_id, data_size,
628  chunk_no, id2_chunk, id2_info);
629 
630  lock_guard<mutex> guard(m_ChunksLock);
632 
633  m_Chunks.push_back(m_Reply->PrepareChunk(
634  (const unsigned char *)(header.data()),
635  header.size()));
636 
637  if (data_size > 0 && chunk_data != nullptr)
638  m_Chunks.push_back(m_Reply->PrepareChunk(chunk_data, data_size));
639 }
640 
641 
643  const string & processor_id,
644  const unsigned char * chunk_data,
645  unsigned int data_size,
646  int chunk_no,
647  int64_t id2_chunk,
648  const string & id2_info)
649 {
651  return;
652 
653  fetch_details->IncrementTotalSentBlobChunks();
654  PrepareTSEBlobData(fetch_details->GetBlobChunkItemId(this),
655  processor_id,
656  chunk_data, data_size, chunk_no,
657  id2_chunk, id2_info);
658 }
659 
660 
662  const string & processor_id,
663  size_t chunk_count)
664 {
666  return;
667 
668  string blob_prop_meta = GetBlobPropCompletionHeader(item_id,
669  processor_id,
670  chunk_count);
671 
672  lock_guard<mutex> guard(m_ChunksLock);
674 
675  m_Chunks.push_back(m_Reply->PrepareChunk(
676  (const unsigned char *)(blob_prop_meta.data()),
677  blob_prop_meta.size()));
679 }
680 
681 
683  const string & processor_id,
684  size_t chunk_count)
685 {
687  return;
688 
689  string blob_prop_meta = GetTSEBlobPropCompletionHeader(item_id,
690  processor_id,
691  chunk_count);
692 
693  lock_guard<mutex> guard(m_ChunksLock);
695 
696  m_Chunks.push_back(m_Reply->PrepareChunk(
697  (const unsigned char *)(blob_prop_meta.data()),
698  blob_prop_meta.size()));
700 }
701 
702 
704  const string & processor_id)
705 {
707  return;
708 
709  // +1 is for the completion itself
710  PrepareBlobPropCompletion(fetch_details->GetBlobPropItemId(this),
711  processor_id,
712  fetch_details->GetTotalSentBlobChunks() + 1);
713 
714  // From now the counter will count chunks for the blob data
715  fetch_details->ResetTotalSentBlobChunks();
716  fetch_details->SetBlobPropSent();
717 }
718 
719 
721  const string & processor_id)
722 {
724  return;
725 
726  // +1 is for the completion itself
728  processor_id,
729  fetch_details->GetTotalSentBlobChunks() + 1);
730 
731  // From now the counter will count chunks for the blob data
732  fetch_details->ResetTotalSentBlobChunks();
733  fetch_details->SetBlobPropSent();
734 }
735 
736 
738  const string & processor_id,
739  const string & blob_id,
740  const string & msg,
741  CRequestStatus::ECode status,
742  int err_code,
743  EDiagSev severity,
744  CBlobRecord::TTimestamp last_modified)
745 {
747  return;
748 
749  string header = GetBlobMessageHeader(item_id, processor_id,
750  blob_id, msg.size(),
751  status, err_code, severity,
752  last_modified);
753 
754  lock_guard<mutex> guard(m_ChunksLock);
756 
757  m_Chunks.push_back(m_Reply->PrepareChunk(
758  (const unsigned char *)(header.data()), header.size()));
759  m_Chunks.push_back(m_Reply->PrepareChunk(
760  (const unsigned char *)(msg.data()), msg.size()));
762 }
763 
764 
766  const string & processor_id,
767  const string & msg,
768  CRequestStatus::ECode status,
769  int err_code,
770  EDiagSev severity,
771  CBlobRecord::TTimestamp last_modified)
772 {
774  return;
775 
776  PrepareBlobMessage(fetch_details->GetBlobChunkItemId(this),
777  processor_id,
778  fetch_details->GetBlobId().ToString(),
779  msg, status, err_code, severity, last_modified);
780  fetch_details->IncrementTotalSentBlobChunks();
781 }
782 
783 
785  const string & processor_id,
786  int64_t id2_chunk,
787  const string & id2_info,
788  const string & msg,
789  CRequestStatus::ECode status,
790  int err_code,
791  EDiagSev severity)
792 {
794  return;
795 
796  string header = GetTSEBlobMessageHeader(item_id, processor_id,
797  id2_chunk, id2_info, msg.size(),
798  status, err_code, severity);
799 
800  lock_guard<mutex> guard(m_ChunksLock);
802 
803  m_Chunks.push_back(m_Reply->PrepareChunk(
804  (const unsigned char *)(header.data()), header.size()));
805  m_Chunks.push_back(m_Reply->PrepareChunk(
806  (const unsigned char *)(msg.data()), msg.size()));
808 }
809 
810 
812  const string & processor_id,
813  int64_t id2_chunk,
814  const string & id2_info,
815  const string & msg,
816  CRequestStatus::ECode status, int err_code,
817  EDiagSev severity)
818 {
820  return;
821 
822  x_PrepareTSEBlobMessage(fetch_details->GetBlobChunkItemId(this),
823  processor_id, id2_chunk, id2_info,
824  msg, status, err_code, severity);
825  fetch_details->IncrementTotalSentBlobChunks();
826 }
827 
828 
830  const string & processor_id,
831  size_t chunk_count)
832 {
834  return;
835 
836  string completion = GetBlobCompletionHeader(item_id, processor_id,
837  chunk_count);
838 
839  lock_guard<mutex> guard(m_ChunksLock);
841 
842  m_Chunks.push_back(m_Reply->PrepareChunk(
843  (const unsigned char *)(completion.data()),
844  completion.size()));
846 }
847 
848 
850  const string & processor_id)
851 {
853  return;
854 
855  // +1 is for the completion itself
856  PrepareTSEBlobCompletion(fetch_details->GetBlobChunkItemId(this),
857  processor_id,
858  fetch_details->GetTotalSentBlobChunks() + 1);
859  fetch_details->IncrementTotalSentBlobChunks();
860 }
861 
862 
864  const string & processor_id,
865  size_t chunk_count)
866 {
868  return;
869 
870  string completion = GetTSEBlobCompletionHeader(item_id, processor_id,
871  chunk_count);
872 
873  lock_guard<mutex> guard(m_ChunksLock);
875 
876  m_Chunks.push_back(m_Reply->PrepareChunk(
877  (const unsigned char *)(completion.data()),
878  completion.size()));
880 }
881 
882 
883 void CPSGS_Reply::PrepareBlobExcluded(const string & blob_id,
884  const string & processor_id,
885  EPSGS_BlobSkipReason skip_reason,
886  CBlobRecord::TTimestamp last_modified)
887 {
889  return;
890 
891  string exclude = GetBlobExcludeHeader(GetItemId(), processor_id,
892  blob_id, skip_reason, last_modified);
893 
894  lock_guard<mutex> guard(m_ChunksLock);
896 
897  m_Chunks.push_back(m_Reply->PrepareChunk(
898  (const unsigned char *)(exclude.data()),
899  exclude.size()));
901 }
902 
903 
904 void CPSGS_Reply::PrepareBlobExcluded(const string & blob_id,
905  const string & processor_id,
906  unsigned long sent_mks_ago,
907  unsigned long until_resend_mks,
908  CBlobRecord::TTimestamp last_modified)
909 {
911  return;
912 
913  string exclude = GetBlobExcludeHeader(GetItemId(), processor_id, blob_id,
914  sent_mks_ago, until_resend_mks,
915  last_modified);
916 
917  lock_guard<mutex> guard(m_ChunksLock);
919 
920  m_Chunks.push_back(m_Reply->PrepareChunk(
921  (const unsigned char *)(exclude.data()),
922  exclude.size()));
924 }
925 
926 
928  const string & processor_id,
929  const string & blob_id,
930  EPSGS_BlobSkipReason skip_reason)
931 {
933  return;
934 
935  string exclude = GetBlobExcludeHeader(item_id, processor_id,
936  blob_id, skip_reason);
937 
938  lock_guard<mutex> guard(m_ChunksLock);
940 
941  m_Chunks.push_back(m_Reply->PrepareChunk(
942  (const unsigned char *)(exclude.data()),
943  exclude.size()));
945 }
946 
947 
948 // NOTE: the blob id argument is temporary to satisfy the older clients
949 void CPSGS_Reply::PrepareTSEBlobExcluded(const string & processor_id,
950  EPSGS_BlobSkipReason skip_reason,
951  const string & blob_id,
952  int64_t id2_chunk,
953  const string & id2_info)
954 {
956  return;
957 
958  // NOTE: the blob id argument is temporary to satisfy the older clients
959  string exclude = GetTSEBlobExcludeHeader(GetItemId(), processor_id, blob_id,
960  skip_reason, id2_chunk, id2_info);
961 
962  lock_guard<mutex> guard(m_ChunksLock);
964 
965  m_Chunks.push_back(m_Reply->PrepareChunk(
966  (const unsigned char *)(exclude.data()),
967  exclude.size()));
969 }
970 
971 
972 // NOTE: the blob id argument is temporary to satisfy the older clients
973 void CPSGS_Reply::PrepareTSEBlobExcluded(const string & blob_id,
974  int64_t id2_chunk,
975  const string & id2_info,
976  const string & processor_id,
977  unsigned long sent_mks_ago,
978  unsigned long until_resend_mks)
979 {
981  return;
982 
983  // NOTE: the blob id argument is temporary to satisfy the older clients
984  string exclude = GetTSEBlobExcludeHeader(GetItemId(), processor_id,
985  blob_id, id2_chunk, id2_info,
986  sent_mks_ago, until_resend_mks);
987 
988  lock_guard<mutex> guard(m_ChunksLock);
990 
991  m_Chunks.push_back(m_Reply->PrepareChunk(
992  (const unsigned char *)(exclude.data()),
993  exclude.size()));
995 }
996 
997 
999  const string & processor_id)
1000 {
1002  return;
1003 
1004  // +1 is for the completion itself
1005  PrepareBlobCompletion(fetch_details->GetBlobChunkItemId(this),
1006  processor_id,
1007  fetch_details->GetTotalSentBlobChunks() + 1);
1008  fetch_details->IncrementTotalSentBlobChunks();
1009 }
1010 
1011 
1012 void CPSGS_Reply::PrepareReplyMessage(const string & msg,
1013  CRequestStatus::ECode status,
1014  int err_code,
1015  EDiagSev severity,
1016  bool need_update_last_activity)
1017 {
1019  return;
1020 
1021  string header = GetReplyMessageHeader(msg.size(),
1022  status, err_code, severity);
1023 
1024  lock_guard<mutex> guard(m_ChunksLock);
1025 
1026  if (need_update_last_activity) {
1028  }
1029 
1030  m_Chunks.push_back(m_Reply->PrepareChunk(
1031  (const unsigned char *)(header.data()), header.size()));
1032  m_Chunks.push_back(m_Reply->PrepareChunk(
1033  (const unsigned char *)(msg.data()), msg.size()));
1035 }
1036 
1037 
1039  const string & processor_id,
1040  const string & msg,
1041  CRequestStatus::ECode status,
1042  int err_code,
1043  EDiagSev severity)
1044 {
1046  return;
1047 
1048  string header = GetProcessorMessageHeader(item_id, processor_id,
1049  msg.size(),
1050  status, err_code, severity);
1051  string completion = GetProcessorMessageCompletionHeader(item_id,
1052  processor_id,
1053  2);
1054 
1055  lock_guard<mutex> guard(m_ChunksLock);
1057 
1058  m_Chunks.push_back(m_Reply->PrepareChunk(
1059  (const unsigned char *)(header.data()), header.size()));
1060  m_Chunks.push_back(m_Reply->PrepareChunk(
1061  (const unsigned char *)(msg.data()), msg.size()));
1063 
1064  m_Chunks.push_back(m_Reply->PrepareChunk(
1065  (const unsigned char *)(completion.data()), completion.size()));
1067 }
1068 
1069 
1070 void CPSGS_Reply::PreparePublicComment(const string & processor_id,
1071  const string & public_comment,
1072  const string & blob_id,
1073  CBlobRecord::TTimestamp last_modified)
1074 {
1076  return;
1077 
1078  auto item_id = GetItemId();
1079  string header = GetPublicCommentHeader(item_id, processor_id, blob_id,
1080  last_modified, public_comment.size());
1081  string completion = GetPublicCommentCompletionHeader(item_id,
1082  processor_id,
1083  2);
1084 
1085  lock_guard<mutex> guard(m_ChunksLock);
1087 
1088  m_Chunks.push_back(m_Reply->PrepareChunk(
1089  (const unsigned char *)(header.data()), header.size()));
1090  m_Chunks.push_back(m_Reply->PrepareChunk(
1091  (const unsigned char *)(public_comment.data()), public_comment.size()));
1093 
1094  m_Chunks.push_back(m_Reply->PrepareChunk(
1095  (const unsigned char *)(completion.data()), completion.size()));
1097 }
1098 
1099 
1100 void CPSGS_Reply::PreparePublicComment(const string & processor_id,
1101  const string & public_comment,
1102  int64_t id2_chunk,
1103  const string & id2_info)
1104 {
1106  return;
1107 
1108  auto item_id = GetItemId();
1109  string header = GetPublicCommentHeader(item_id, processor_id, id2_chunk,
1110  id2_info, public_comment.size());
1111  string completion = GetPublicCommentCompletionHeader(item_id,
1112  processor_id,
1113  2);
1114 
1115  lock_guard<mutex> guard(m_ChunksLock);
1117 
1118  m_Chunks.push_back(m_Reply->PrepareChunk(
1119  (const unsigned char *)(header.data()), header.size()));
1120  m_Chunks.push_back(m_Reply->PrepareChunk(
1121  (const unsigned char *)(public_comment.data()), public_comment.size()));
1123 
1124  m_Chunks.push_back(m_Reply->PrepareChunk(
1125  (const unsigned char *)(completion.data()), completion.size()));
1127 }
1128 
1129 
1130 void CPSGS_Reply::PrepareNamedAnnotationData(const string & annot_name,
1131  const string & processor_id,
1132  const string & content)
1133 {
1135  return;
1136 
1137  size_t item_id = GetItemId();
1138  string header = GetNamedAnnotationHeader(item_id, processor_id,
1139  annot_name, content.size());
1140  // There are always 2 chunks
1141  string bioseq_na_meta = GetNamedAnnotationCompletionHeader(item_id,
1142  processor_id,
1143  2);
1144 
1145  lock_guard<mutex> guard(m_ChunksLock);
1147 
1148  m_Chunks.push_back(m_Reply->PrepareChunk(
1149  (const unsigned char *)(header.data()), header.size()));
1150  m_Chunks.push_back(m_Reply->PrepareChunk(
1151  (const unsigned char *)(content.data()), content.size()));
1153 
1154  m_Chunks.push_back(m_Reply->PrepareChunk(
1155  (const unsigned char *)(bioseq_na_meta.data()),
1156  bioseq_na_meta.size()));
1158 }
1159 
1160 
1162 {
1164  return;
1165 
1166  size_t item_id = GetItemId();
1167  string header = GetPerNamedAnnotationResultsHeader(item_id,
1168  content.size());
1169  // There are always 2 chunks
1170  string na_results_meta = GetPerNAResultsCompletionHeader(item_id, 2);
1171 
1172  lock_guard<mutex> guard(m_ChunksLock);
1174  m_Chunks.push_back(m_Reply->PrepareChunk(
1175  (const unsigned char *)(header.data()), header.size()));
1176  m_Chunks.push_back(m_Reply->PrepareChunk(
1177  (const unsigned char *)(content.data()), content.size()));
1179 
1180  m_Chunks.push_back(m_Reply->PrepareChunk(
1181  (const unsigned char *)(na_results_meta.data()),
1182  na_results_meta.size()));
1184 }
1185 
1186 
1187 void CPSGS_Reply::PrepareAccVerHistoryData(const string & processor_id,
1188  const string & content)
1189 {
1191  return;
1192 
1193  size_t item_id = GetItemId();
1194  string header = GetAccVerHistoryHeader(item_id, processor_id,
1195  content.size());
1196 
1197  // There are always 2 chunks
1198  string acc_ver_hist_meta = GetAccVerHistCompletionHeader(item_id,
1199  processor_id,
1200  2);
1201 
1202  lock_guard<mutex> guard(m_ChunksLock);
1204 
1205  m_Chunks.push_back(m_Reply->PrepareChunk(
1206  (const unsigned char *)(header.data()), header.size()));
1207  m_Chunks.push_back(m_Reply->PrepareChunk(
1208  (const unsigned char *)(content.data()), content.size()));
1210 
1211  m_Chunks.push_back(m_Reply->PrepareChunk(
1212  (const unsigned char *)(acc_ver_hist_meta.data()),
1213  acc_ver_hist_meta.size()));
1215 }
1216 
1217 
1218 void CPSGS_Reply::PrepareIPGResolveData(const string & processor_id,
1219  const string & content)
1220 {
1222  return;
1223 
1224  size_t item_id = GetItemId();
1225  string data_and_meta = GetIPGResolveHeader(item_id, processor_id,
1226  content.size());
1227 
1228  lock_guard<mutex> guard(m_ChunksLock);
1230  m_Chunks.push_back(m_Reply->PrepareChunk(
1231  (const unsigned char *)(data_and_meta.data()), data_and_meta.size()));
1232  m_Chunks.push_back(m_Reply->PrepareChunk(
1233  (const unsigned char *)(content.data()), content.size()));
1235 }
1236 
1237 
1238 void CPSGS_Reply::PrepareIPGInfoMessageAndMeta(const string & processor_id,
1239  const string & msg,
1240  CRequestStatus::ECode status,
1241  int err_code,
1242  EDiagSev severity)
1243 {
1245  return;
1246 
1247  size_t item_id = GetItemId();
1248  string data_and_meta = GetIPGMessageHeader(item_id, processor_id,
1249  status, err_code, severity,
1250  msg.size());
1251 
1252  lock_guard<mutex> guard(m_ChunksLock);
1254  m_Chunks.push_back(m_Reply->PrepareChunk(
1255  (const unsigned char *)(data_and_meta.data()), data_and_meta.size()));
1256  m_Chunks.push_back(m_Reply->PrepareChunk(
1257  (const unsigned char *)(msg.data()), msg.size()));
1259 }
1260 
1261 
1263 {
1264  // NOTE: no need to update the last activity
1265  // - it is used by the dispatcher
1266  // - it is when the request timer is over
1267 
1269  return;
1270 
1271  string header = GetReplyMessageHeader(msg.size(),
1274 
1275  lock_guard<mutex> guard(m_ChunksLock);
1276  m_Chunks.push_back(m_Reply->PrepareChunk(
1277  (const unsigned char *)(header.data()), header.size()));
1278  m_Chunks.push_back(m_Reply->PrepareChunk(
1279  (const unsigned char *)(msg.data()), msg.size()));
1281 }
1282 
1283 
1284 void CPSGS_Reply::PrepareProcessorProgressMessage(const string & processor_id,
1285  const string & progress_status)
1286 {
1287  // NOTE: no need to update the last activity because it is used by the dispatcher
1288 
1290  return;
1291 
1292  size_t item_id = GetItemId();
1293  string header = GetProcessorProgressMessageHeader(item_id,
1294  processor_id,
1295  progress_status);
1296 
1297  lock_guard<mutex> guard(m_ChunksLock);
1298  m_Chunks.push_back(m_Reply->PrepareChunk(
1299  (const unsigned char *)(header.data()), header.size()));
1301 }
1302 
1303 
1305  const psg_time_point_t & create_timestamp)
1306 {
1308  return;
1309  if (m_Reply->IsClosed())
1310  return;
1311 
1312  lock_guard<mutex> guard(m_ChunksLock);
1314 
1316 
1317  string reply_completion = GetReplyCompletionHeader(m_TotalSentReplyChunks,
1318  status,
1319  create_timestamp);
1320  m_Chunks.push_back(m_Reply->PrepareChunk(
1321  (const unsigned char *)(reply_completion.data()),
1322  reply_completion.size()));
1323 }
1324 
1325 
1326 // The last activity timestamp needs to be updated if it was a processor
1327 // initiated activity with the reply. If it was a trace from the processor
1328 // dispatcher then the activity timestamp does not need to be updated
1329 void CPSGS_Reply::SendTrace(const string & msg,
1330  const psg_time_point_t & create_timestamp,
1331  bool need_update_last_activity)
1332 {
1333  if (need_update_last_activity) {
1335  }
1336 
1338  return;
1339 
1340  auto now = psg_clock_t::now();
1341  uint64_t mks = chrono::duration_cast<chrono::microseconds>
1342  (now - create_timestamp).count();
1343  string timestamp = "Timestamp (mks): " + to_string(mks) + "\n";
1344 
1345  PrepareReplyMessage(timestamp + msg,
1347  need_update_last_activity);
1348 }
1349 
int64_t TTimestamp
Definition: blob_record.hpp:56
void IncrementTotalSentBlobChunks(void)
Definition: cass_fetch.hpp:344
void SetBlobPropSent(void)
Definition: cass_fetch.hpp:350
int32_t GetTotalSentBlobChunks(void) const
Definition: cass_fetch.hpp:341
size_t GetBlobPropItemId(CPSGS_Reply *reply)
Definition: cass_fetch.cpp:124
size_t GetBlobChunkItemId(CPSGS_Reply *reply)
Definition: cass_fetch.cpp:132
void ResetTotalSentBlobChunks(void)
Definition: cass_fetch.hpp:347
SCass_BlobId GetBlobId(void) const
Definition: cass_fetch.hpp:124
void SetContentLength(uint64_t content_length)
Definition: http_reply.hpp:128
void Send202(const char *payload, size_t payload_len)
Definition: http_reply.hpp:195
h2o_iovec_t PrepareChunk(const unsigned char *data, unsigned int size)
Definition: http_reply.hpp:281
void SetCompleted(void)
Definition: http_reply.cpp:79
void Send401(const char *payload)
Definition: http_reply.hpp:204
bool IsCompleted(void) const
Definition: http_reply.hpp:265
void SetRequestId(size_t request_id)
Definition: http_reply.hpp:138
void Send409(const char *payload)
Definition: http_reply.hpp:210
size_t GetBytesSent(void) const
Definition: http_reply.hpp:148
void Send404(const char *payload)
Definition: http_reply.hpp:207
bool IsOutputReady(void) const
Definition: http_reply.hpp:257
bool IsFinished(void) const
Definition: http_reply.hpp:254
void Send400(const char *payload)
Definition: http_reply.hpp:201
bool IsClosed(void) const
Definition: http_reply.cpp:73
void Send502(const char *payload)
Definition: http_reply.hpp:216
shared_ptr< CCassDataCallbackReceiver > GetDataReadyCB(void)
Definition: http_reply.hpp:308
void SetContentType(EPSGS_ReplyMimeType mime_type)
Definition: http_reply.hpp:143
void Send503(const char *payload)
Definition: http_reply.hpp:219
void Send500(const char *payload)
Definition: http_reply.hpp:213
void Send(const char *payload, size_t payload_len, bool is_persist, bool is_last)
Definition: http_reply.hpp:155
void NotifyClientConnectionDrop(void)
Definition: http_reply.hpp:187
void SendOk(const char *payload, size_t payload_len, bool is_persist)
Definition: http_reply.hpp:192
void x_PrepareTSEBlobMessage(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:784
bool m_ReplyOwned
Definition: psgs_reply.hpp:372
void PrepareBlobData(size_t item_id, const string &processor_id, const string &blob_id, const unsigned char *chunk_data, unsigned int data_size, int chunk_no, CBlobRecord::TTimestamp last_modified=-1)
Definition: psgs_reply.cpp:567
void Clear(void)
Definition: psgs_reply.cpp:124
void PrepareIPGResolveData(const string &processor_id, const string &content)
void x_PrepareTSEBlobPropMessage(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:423
void PrepareBioseqCompletion(size_t item_id, const string &processor_id, size_t chunk_count)
Definition: psgs_reply.cpp:377
void PrepareBlobExcluded(const string &blob_id, const string &processor_id, EPSGS_BlobSkipReason skip_reason, CBlobRecord::TTimestamp last_modified=-1)
Definition: psgs_reply.cpp:883
void PrepareProcessorProgressMessage(const string &processor_id, const string &progress_status)
void PrepareTSEBlobPropMessage(CCassBlobFetch *fetch_details, const string &processor_id, int64_t id2_chunk, const string &id2_info, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:466
void SendPerNamedAnnotationResults(const string &content)
shared_ptr< idblob::CCassDataCallbackReceiver > GetDataReadyCB(void)
Definition: psgs_reply.cpp:135
size_t GetBytesSent(void) const
Definition: psgs_reply.cpp:158
int32_t m_TotalSentReplyChunks
Definition: psgs_reply.hpp:375
void PrepareIPGInfoMessageAndMeta(const string &processor_id, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
void PrepareBlobCompletion(size_t item_id, const string &processor_id, size_t chunk_count)
Definition: psgs_reply.cpp:829
void ConnectionCancel(void)
Definition: psgs_reply.cpp:50
void SetContentLength(uint64_t content_length)
Definition: psgs_reply.cpp:150
void PrepareBioseqData(size_t item_id, const string &processor_id, const string &content, SPSGS_ResolveRequest::EPSGS_OutputFormat output_format)
Definition: psgs_reply.cpp:354
void PrepareBlobPropCompletion(size_t item_id, const string &processor_id, size_t chunk_count)
Definition: psgs_reply.cpp:661
void SendTrace(const string &msg, const psg_time_point_t &create_timestamp, bool need_update_last_activity=true)
void SetContentType(EPSGS_ReplyMimeType mime_type)
Definition: psgs_reply.cpp:141
void PrepareBlobMessage(size_t item_id, const string &processor_id, const string &blob_id, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity, CBlobRecord::TTimestamp last_modified=-1)
Definition: psgs_reply.cpp:737
void PrepareTSEBlobPropCompletion(CCassBlobFetch *fetch_details, const string &processor_id)
Definition: psgs_reply.cpp:720
void PrepareBlobPropData(size_t item_id, const string &processor_id, const string &blob_id, const string &content, CBlobRecord::TTimestamp last_modified=-1)
Definition: psgs_reply.cpp:485
void x_PrepareTSEBlobPropCompletion(size_t item_id, const string &processor_id, size_t chunk_count)
Definition: psgs_reply.cpp:682
void Send400(const char *payload)
Definition: psgs_reply.cpp:202
mutex m_ChunksLock
Definition: psgs_reply.hpp:376
void Send404(const char *payload)
Definition: psgs_reply.cpp:238
size_t m_RequestId
Definition: psgs_reply.hpp:379
CHttpReply * m_Reply
Definition: psgs_reply.hpp:371
@ ePSGS_SendAccumulated
Definition: psgs_reply.hpp:54
void PrepareTSEBlobMessage(CCassBlobFetch *fetch_details, const string &processor_id, int64_t id2_chunk, const string &id2_info, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:811
void PrepareReplyMessage(const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity, bool need_update_last_activity=true)
bool IsOutputReady(void) const
Definition: psgs_reply.cpp:106
void SetRequestId(size_t request_id)
Definition: psgs_reply.cpp:117
void PreparePublicComment(const string &processor_id, const string &public_comment, const string &blob_id, CBlobRecord::TTimestamp last_modified)
void PrepareNamedAnnotationData(const string &annot_name, const string &processor_id, const string &content)
bool IsClosed(void) const
Definition: psgs_reply.cpp:112
bool IsCompleted(void) const
Definition: psgs_reply.cpp:94
void Send503(const char *payload)
Definition: psgs_reply.cpp:310
void Send409(const char *payload)
Definition: psgs_reply.cpp:256
void Send401(const char *payload)
Definition: psgs_reply.cpp:220
size_t GetItemId(void)
Definition: psgs_reply.hpp:133
void PrepareProcessorMessage(size_t item_id, const string &processor_id, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
void x_UpdateLastActivity(void)
Definition: psgs_reply.hpp:365
void PrepareTSEBlobExcluded(const string &processor_id, EPSGS_BlobSkipReason skip_reason, const string &blob_id, int64_t id2_chunk, const string &id2_info)
Definition: psgs_reply.cpp:949
void PrepareAccVerHistoryData(const string &processor_id, const string &content)
void PrepareTSEBlobPropData(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, const string &content)
Definition: psgs_reply.cpp:541
void PrepareTSEBlobData(size_t item_id, const string &processor_id, const unsigned char *chunk_data, unsigned int data_size, int chunk_no, int64_t id2_chunk, const string &id2_info)
Definition: psgs_reply.cpp:614
void Send502(const char *payload)
Definition: psgs_reply.cpp:292
void PrepareTSEBlobCompletion(size_t item_id, const string &processor_id, size_t chunk_count)
Definition: psgs_reply.cpp:863
void PrepareBlobPropMessage(size_t item_id, const string &processor_id, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:398
void Send202(const char *payload, size_t payload_len)
Definition: psgs_reply.cpp:184
void PrepareBioseqMessage(size_t item_id, const string &processor_id, const string &msg, CRequestStatus::ECode status, int err_code, EDiagSev severity)
Definition: psgs_reply.cpp:328
void PrepareReplyCompletion(CRequestStatus::ECode status, const psg_time_point_t &create_timestamp)
vector< h2o_iovec_t > m_Chunks
Definition: psgs_reply.hpp:377
volatile bool m_ConnectionCanceled
Definition: psgs_reply.hpp:378
void SetCompleted(void)
Definition: psgs_reply.cpp:87
void PrepareRequestTimeoutMessage(const string &msg)
void Send500(const char *payload)
Definition: psgs_reply.cpp:274
void Flush(EPSGS_ReplyFlush how)
Definition: psgs_reply.cpp:57
bool IsFinished(void) const
Definition: psgs_reply.cpp:100
void SendOk(const char *payload, size_t payload_len, bool is_persist)
Definition: psgs_reply.cpp:166
Uint8 uint64_t
Int8 int64_t
EDiagSev
Severity level for the posted diagnostics.
Definition: ncbidiag.hpp:650
@ eDiag_Trace
Trace message.
Definition: ncbidiag.hpp:657
@ eDiag_Error
Error message.
Definition: ncbidiag.hpp:653
EPSGS_BlobSkipReason
@ ePSGS_RequestTimeout
psg_clock_t::time_point psg_time_point_t
string GetPublicCommentCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetReplyMessageHeader(size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetIPGMessageHeader(size_t item_id, const string &processor_id, CRequestStatus::ECode status, int code, EDiagSev severity, size_t msg_size)
string GetPerNamedAnnotationResultsHeader(size_t item_id, size_t per_annot_result_size)
string GetTSEBlobChunkHeader(size_t item_id, const string &processor_id, size_t chunk_size, size_t chunk_number, int64_t id2_chunk, const string &id2_info)
string GetAccVerHistoryHeader(size_t item_id, const string &processor_id, size_t msg_size)
string GetBlobMessageHeader(size_t item_id, const string &processor_id, const string &blob_id, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity, CBlobRecord::TTimestamp last_modified)
string GetBioseqMessageHeader(size_t item_id, const string &processor_id, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetBlobPropHeader(size_t item_id, const string &processor_id, const string &blob_id, size_t blob_prop_size, CBlobRecord::TTimestamp last_modified)
string GetReplyCompletionHeader(size_t chunk_count, CRequestStatus::ECode status, const psg_time_point_t &create_timestamp)
string GetBlobPropMessageHeader(size_t item_id, const string &processor_id, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetBioseqInfoHeader(size_t item_id, const string &processor_id, size_t bioseq_info_size, SPSGS_ResolveRequest::EPSGS_OutputFormat output_format)
string GetPerNAResultsCompletionHeader(size_t item_id, size_t chunk_count)
string GetTSEBlobPropMessageHeader(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetNamedAnnotationCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetTSEBlobPropCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetBlobCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetNamedAnnotationHeader(size_t item_id, const string &processor_id, const string &annot_name, size_t annotation_size)
string GetPublicCommentHeader(size_t item_id, const string &processor_id, const string &blob_id, CBlobRecord::TTimestamp last_modified, size_t msg_size)
string GetProcessorMessageCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetBlobChunkHeader(size_t item_id, const string &processor_id, const string &blob_id, size_t chunk_size, size_t chunk_number, CBlobRecord::TTimestamp last_modified)
string GetIPGResolveHeader(size_t item_id, const string &processor_id, size_t msg_size)
string GetTSEBlobExcludeHeader(size_t item_id, const string &processor_id, const string &blob_id, EPSGS_BlobSkipReason skip_reason, int64_t id2_chunk, const string &id2_info)
string GetBioseqCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetAccVerHistCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetProcessorMessageHeader(size_t item_id, const string &processor_id, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetTSEBlobCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetBlobPropCompletionHeader(size_t item_id, const string &processor_id, size_t chunk_count)
string GetBlobExcludeHeader(size_t item_id, const string &processor_id, const string &blob_id, EPSGS_BlobSkipReason skip_reason, CBlobRecord::TTimestamp last_modified)
string GetTSEBlobMessageHeader(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, size_t msg_size, CRequestStatus::ECode status, int code, EDiagSev severity)
string GetTSEBlobPropHeader(size_t item_id, const string &processor_id, int64_t id2_chunk, const string &id2_info, size_t blob_prop_size)
string GetProcessorProgressMessageHeader(size_t item_id, const string &processor_id, const string &progress_status)
string ToString(void) const
Modified on Thu Apr 11 15:02:44 2024 by modify_doxy.py rev. 669887