#include <file_upload_streamer.h>
Public Member Functions | |
void | addStatusMonitor (std::shared_ptr< StatusMonitor > &status_monitor) |
FileUploadStreamer (std::shared_ptr< DataReader< T >> data_reader, FileUploadStreamerOptions options) | |
void | forceWork () |
bool | initialize () |
void | onComplete (const Aws::DataFlow::UploadStatus &upload_status, const FileObject< T > &message) |
void | onPublisherStateChange (const Aws::DataFlow::Status &status) |
void | setStatusMonitorTimeout (std::chrono::milliseconds new_timeout) |
bool | shutdown () override |
bool | start () override |
~FileUploadStreamer () override=default | |
Public Member Functions inherited from Aws::DataFlow::OutputStage< O > | |
std::shared_ptr< Sink< O > > | getSink () |
std::enable_if< std::is_base_of< Sink< O >, T >::value, std::shared_ptr< T > >::type | setSink (std::shared_ptr< T > sink) |
Public Member Functions inherited from RunnableService | |
std::string | getStatusString () override |
virtual bool | isRunning () |
void | join () |
RunnableService () | |
void | waitForShutdown (std::chrono::milliseconds millis) |
void | waitForShutdown () |
~RunnableService () override=default | |
Public Member Functions inherited from Service | |
ServiceState | getState () |
Service () | |
virtual | ~Service ()=default |
Protected Member Functions | |
void | work () override |
Protected Member Functions inherited from RunnableService | |
virtual void | run () |
virtual bool | startWorkerThread () |
virtual bool | stopWorkerThread () |
Protected Member Functions inherited from Service | |
void | setState (ServiceState new_state) |
Private Attributes | |
size_t | batch_size_ |
std::shared_ptr< DataReader< T > > | data_reader_ |
std::shared_ptr< StatusMonitor > | network_monitor_ |
MultiStatusConditionMonitor | status_condition_monitor_ |
std::chrono::milliseconds | status_monitor_timeout_ |
std::shared_ptr< FileUploadTask< T > > | stored_task_ |
size_t | total_logs_uploaded = 0 |
File upload manager handles reading data from the file manager and placing it in the observed queue.
T |
Definition at line 60 of file file_upload_streamer.h.
|
inlineexplicit |
Create a file upload manager.
status_condition_monitor | |
file_manager | |
observed_queue | |
batch_size |
Definition at line 71 of file file_upload_streamer.h.
|
overridedefault |
|
inline |
Add a status monitor for the file upload manager to wait for work on.
status_monitor | to add |
Definition at line 93 of file file_upload_streamer.h.
|
inline |
Definition at line 133 of file file_upload_streamer.h.
|
inline |
Definition at line 111 of file file_upload_streamer.h.
|
inline |
Definition at line 115 of file file_upload_streamer.h.
|
inline |
Definition at line 104 of file file_upload_streamer.h.
|
inline |
Definition at line 137 of file file_upload_streamer.h.
|
inlineoverridevirtual |
Reimplemented from RunnableService.
Definition at line 97 of file file_upload_streamer.h.
|
inlineoverridevirtual |
Start the upload thread.
Reimplemented from RunnableService.
Definition at line 125 of file file_upload_streamer.h.
|
inlineoverrideprotectedvirtual |
Attempt to start uploading.
Implements RunnableService.
Definition at line 152 of file file_upload_streamer.h.
|
private |
The configured batch size to use when uploading.
Definition at line 221 of file file_upload_streamer.h.
|
private |
The file manager to read data from.
Definition at line 226 of file file_upload_streamer.h.
|
private |
Network status monitor.
Definition at line 231 of file file_upload_streamer.h.
|
private |
The status condition monitor to wait on before uploading.
Definition at line 206 of file file_upload_streamer.h.
|
private |
Timeout to wait for work.
Definition at line 236 of file file_upload_streamer.h.
|
private |
Current task to upload.
Definition at line 211 of file file_upload_streamer.h.
|
private |
Metric on number of logs queued in the TaskObservedQueue.
Definition at line 216 of file file_upload_streamer.h.