コード例 #1
0
ファイル: rotation.hpp プロジェクト: izenecloud/blackhole
    void rollover() const {
        const std::string& filename = backend.filename();
        const std::string& basename = generator.transform(filename);

        if (counter.valid()) {
            rollover(backend.listdir(), basename);
        }

        if (backend.exists(filename)) {
            backend.rename(filename, backup_filename(basename));
        }
    }
コード例 #2
0
ファイル: assert_util.cpp プロジェクト: Andiry/mongo
void AssertionCount::condrollover(int newvalue) {
    static const int rolloverPoint = (1 << 30);
    if (newvalue >= rolloverPoint)
        rollover();
}
コード例 #3
0
ファイル: assert_util.cpp プロジェクト: kapouer/mongo-debian
 void AssertionCount::condrollover( int newvalue ){
     static int max = (int)pow( 2.0 , 30 );
     if ( newvalue >= max )
         rollover();
 }
コード例 #4
0
ファイル: rotation.hpp プロジェクト: izenecloud/blackhole
 void rotate() const {
     backend.flush();
     backend.close();
     rollover();
     backend.open();
 }