MCPcopy Create free account
hub / github.com/apache/thrift / TFileTransport

Method TFileTransport

lib/cpp/src/thrift/transport/TFileTransport.cpp:62–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60using namespace apache::thrift::concurrency;
61
62TFileTransport::TFileTransport(string path, bool readOnly, std::shared_ptr<TConfiguration> config)
63 : TTransport(config),
64 readState_(),
65 readBuff_(nullptr),
66 currentEvent_(nullptr),
67 readBuffSize_(DEFAULT_READ_BUFF_SIZE),
68 readTimeout_(NO_TAIL_READ_TIMEOUT),
69 chunkSize_(DEFAULT_CHUNK_SIZE),
70 eventBufferSize_(DEFAULT_EVENT_BUFFER_SIZE),
71 flushMaxUs_(DEFAULT_FLUSH_MAX_US),
72 flushMaxBytes_(DEFAULT_FLUSH_MAX_BYTES),
73 maxEventSize_(DEFAULT_MAX_EVENT_SIZE),
74 maxCorruptedEvents_(DEFAULT_MAX_CORRUPTED_EVENTS),
75 eofSleepTime_(DEFAULT_EOF_SLEEP_TIME_US),
76 corruptedEventSleepTime_(DEFAULT_CORRUPTED_SLEEP_TIME_US),
77 writerThreadIOErrorSleepTime_(DEFAULT_WRITER_THREAD_SLEEP_TIME_US),
78 dequeueBuffer_(nullptr),
79 enqueueBuffer_(nullptr),
80 notFull_(&mutex_),
81 notEmpty_(&mutex_),
82 closing_(false),
83 flushed_(&mutex_),
84 forceFlush_(false),
85 filename_(path),
86 fd_(0),
87 bufferAndThreadInitialized_(false),
88 offset_(0),
89 lastBadChunk_(0),
90 numCorruptedEventsInChunk_(0),
91 readOnly_(readOnly) {
92 threadFactory_.setDetached(false);
93 openLogFile();
94}
95
96void TFileTransport::resetOutputFile(int fd, string filename, off_t offset) {
97 filename_ = filename;

Callers

nothing calls this directly

Calls 1

setDetachedMethod · 0.80

Tested by

no test coverage detected