git-svn-id: svn://db.shs.com.ru/pip@810 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -187,7 +187,10 @@ public:
|
||||
int readBinLog(int id, void * read_to, int max_size, PISystemTime * time = 0);
|
||||
|
||||
//! Returns binary log file size
|
||||
llong logSize() const {return file.size();}
|
||||
llong logSize() const {PIMutexLocker _ml(file_mutex); return file.size();}
|
||||
|
||||
//! Return position in current binlog file
|
||||
llong logPos() const {PIMutexLocker _ml(file_mutex); return file.pos();}
|
||||
|
||||
//! Return true, if position at the end of BinLog file
|
||||
bool isEnd() const {if (isClosed()) return true; return file.isEnd();}
|
||||
@@ -228,6 +231,9 @@ public:
|
||||
//! Create index of current binlog file
|
||||
bool createIndex();
|
||||
|
||||
//! Return if current binlog file is indexed
|
||||
bool isIndexed() {return is_indexed;}
|
||||
|
||||
//! Go to record #index
|
||||
void seekTo(int rindex);
|
||||
|
||||
@@ -297,7 +303,7 @@ private:
|
||||
bool writeFileHeader();
|
||||
bool checkFileHeader();
|
||||
BinLogRecord readRecord();
|
||||
static void parseLog(PIFile *f, BinLogInfo *info, PIVector<BinLogIndex> * index);
|
||||
static void parseLog(PIFile *f, BinLogInfo *info, PIVector<BinLogIndex> * index, PIMutex & file_mutex);
|
||||
void moveIndex(int i);
|
||||
PIString getLogfilePath() const;
|
||||
|
||||
@@ -310,7 +316,7 @@ private:
|
||||
PIFile file;
|
||||
BinLogRecord lastrecord;
|
||||
PISystemTime startlogtime, play_delay, split_time, pause_time;
|
||||
PIMutex logmutex, pausemutex;
|
||||
mutable PIMutex logmutex, pausemutex, file_mutex;
|
||||
double play_time, play_speed;
|
||||
llong split_size;
|
||||
int write_count, split_count, default_id, current_index;
|
||||
|
||||
Reference in New Issue
Block a user