|
ICP
1
|
#include <SplitFile.h>

Public Member Functions | |
| SplitFile () | |
| int | open (const std::string &path, IFile::Mode mode, int shflag) |
| int | open (const std::string &path, Mode mode, int shflag, bool toggle_readonly) |
| size_t | write (const void *data, size_t element_size, size_t nelement) |
| size_t | read (void *data, size_t element_size, size_t nelement) |
| int | close () |
| int | seek (int64_t offset, int whence) |
| int | tell (int64_t &offset) |
| int | discardContents () |
| bool | isOpen () const |
| int | flush () |
| ~SplitFile () | |
Static Public Member Functions | |
| static void | removeFile (const std::string &path) |
Private Member Functions | |
| SplitFile (const SplitFile &) | |
| void | operator= (const SplitFile &) |
| int | open () |
| std::string | fileNamefromCount (size_t count) const |
| std::string | getFileName () const |
| void | nextFile () |
| size_t | countFromOffset (int64_t offset) const |
| void | findFiles (std::set< std::string > &files) const |
| std::string | openMode (const std::string &path) const |
| determine flags to use for fopen/fsopen More... | |
Static Private Member Functions | |
| static void | findFiles (const Poco::Path &path, std::set< std::string > &files) |
Private Attributes | |
| FILE * | m_file |
| size_t | m_count |
| size_t | m_current_bytes |
| int | m_shflag |
| int | m_mode |
| Poco::Path | m_top_directory |
| bool | m_toggle_readonly |
Static Private Attributes | |
| static const size_t | m_bytes_per_file = 512*1024 |
| static const size_t | m_files_per_sub_dir = 1000 |
Additional Inherited Members | |
Public Types inherited from IFile | |
| enum | Mode { ReadOnly, ReadWriteCreate } |
Protected Member Functions inherited from ISIS::Base | |
| Base (const std::string &logger_name="UNKNOWN") | |
| void | setLoggerName (const std::string &logger_name) |
| virtual | ~Base () |
| virtual std::string | loggingPrefix () const |
| void | setThisLoggerLevel (int level) |
Static Protected Member Functions inherited from ISIS::Base | |
| static void | setAllLoggerLevel (int level) |
Protected Attributes inherited from ISIS::Base | |
| Poco::Logger * | m_logger |
| Poco::LogStream * | m_logstr |
| Poco::Mutex | m_logger_lock |
Definition at line 6 of file SplitFile.h.
|
inlineprivate |
Definition at line 19 of file SplitFile.h.
| SplitFile::SplitFile | ( | ) |
Definition at line 8 of file SplitFile.cpp.
References ISIS::Base::setLoggerName().
| SplitFile::~SplitFile | ( | ) |
Definition at line 13 of file SplitFile.cpp.
References close().
|
virtual |
Implements IFile.
Definition at line 135 of file SplitFile.cpp.
References flush(), getFileName(), m_file, m_toggle_readonly, and RetryWIN32APIBOOL().
Referenced by EventStoreCard::closeFiles(), nextFile(), seek(), EventStoreCard::setOutputFileName(), FileEventSource::~FileEventSource(), and ~SplitFile().
|
private |
|
virtual |
Implements IFile.
Definition at line 188 of file SplitFile.cpp.
References findFiles(), getFileName(), m_file, and RetryWIN32APIBOOL().
Referenced by EventStoreCard::clearOutputFile().
|
private |
Definition at line 260 of file SplitFile.cpp.
References m_files_per_sub_dir, and m_top_directory.
Referenced by getFileName().
|
private |
Definition at line 267 of file SplitFile.cpp.
References m_top_directory.
Referenced by discardContents(), and removeFile().
|
staticprivate |
Definition at line 272 of file SplitFile.cpp.
|
virtual |
Implements IFile.
Definition at line 238 of file SplitFile.cpp.
References m_file.
Referenced by close(), and EventStoreCard::flushEvents().
|
private |
Definition at line 255 of file SplitFile.cpp.
References fileNamefromCount(), and m_count.
Referenced by close(), discardContents(), and open().
|
virtual |
Implements IFile.
Definition at line 233 of file SplitFile.cpp.
References m_file.
Referenced by EventStoreCard::closeFiles(), FileEventSource::FileEventSource(), EventStoreCard::flushEvents(), EventStoreCard::setOutputFileName(), EventStoreCard::updateFilePosition(), and FileEventSource::~FileEventSource().
|
private |
|
inlinevirtual |
Implements IFile.
Definition at line 24 of file SplitFile.h.
References open().
Referenced by FileEventSource::FileEventSource(), and EventStoreCard::setOutputFileName().
| int SplitFile::open | ( | const std::string & | path, |
| Mode | mode, | ||
| int | shflag, | ||
| bool | toggle_readonly | ||
| ) |
Definition at line 18 of file SplitFile.cpp.
References m_count, m_mode, m_shflag, m_toggle_readonly, m_top_directory, and open().
|
private |
Definition at line 28 of file SplitFile.cpp.
References getFileName(), LOGSTR_ERROR, m_current_bytes, m_file, m_shflag, m_toggle_readonly, openMode(), and RetryWIN32APIBOOL().
Referenced by nextFile(), open(), and seek().
|
private |
determine flags to use for fopen/fsopen
Definition at line 282 of file SplitFile.cpp.
References m_mode, IFile::ReadOnly, and IFile::ReadWriteCreate.
Referenced by open().
|
inlineprivate |
Definition at line 20 of file SplitFile.h.
References m_file.
|
virtual |
Implements IFile.
Definition at line 85 of file SplitFile.cpp.
References m_bytes_per_file, m_current_bytes, m_file, and nextFile().
Referenced by FileEventSource::getNewEvents().
|
static |
Definition at line 212 of file SplitFile.cpp.
References findFiles(), and RetryWIN32APIBOOL().
Referenced by EventStore::deleteOutputFile(), and EventStore::setOutputFileName().
|
virtual |
Implements IFile.
Definition at line 154 of file SplitFile.cpp.
References close(), countFromOffset(), m_bytes_per_file, m_count, m_current_bytes, m_file, and open().
Referenced by EventStoreCard::clearOutputFile(), and EventStoreCard::setOutputFileName().
| int SplitFile::tell | ( | int64_t & | offset | ) |
Definition at line 178 of file SplitFile.cpp.
References m_bytes_per_file, m_count, m_current_bytes, and m_file.
|
virtual |
Implements IFile.
Definition at line 56 of file SplitFile.cpp.
References m_bytes_per_file, m_current_bytes, m_file, and nextFile().
Referenced by EventStoreCard::flushEvents().
|
staticprivate |
Definition at line 12 of file SplitFile.h.
Referenced by countFromOffset(), read(), seek(), tell(), and write().
|
private |
Definition at line 10 of file SplitFile.h.
Referenced by getFileName(), nextFile(), open(), seek(), and tell().
|
private |
|
private |
Definition at line 9 of file SplitFile.h.
Referenced by close(), discardContents(), flush(), isOpen(), open(), operator=(), read(), seek(), tell(), and write().
|
staticprivate |
Definition at line 13 of file SplitFile.h.
Referenced by fileNamefromCount().
|
private |
Definition at line 16 of file SplitFile.h.
Referenced by open(), and openMode().
|
private |
Definition at line 15 of file SplitFile.h.
Referenced by open().
|
private |
Definition at line 18 of file SplitFile.h.
|
private |
Definition at line 17 of file SplitFile.h.
Referenced by fileNamefromCount(), findFiles(), and open().
1.8.5