예제 #1
0
 public override bool RotationNeeded()
 {
     /*
      * Whereas channel.size() should be fine, we're safer calling position() due to possibility
      * of this file being memory mapped or whatever.
      */
     return(_channel.position() >= _rotateAtSize.get());
 }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void start() throws java.io.IOException
        public override void Start()
        {
            // Recovery has taken place before this, so the log file has been truncated to last known good tx
            // Just read header and move to the end
            long lastLogVersionUsed = _logVersionRepository.CurrentLogVersion;

            _channel = _logFiles.createLogChannelForVersion(lastLogVersionUsed, OpenMode.READ_WRITE, _context.getLastCommittedTransactionId);
            // Move to the end
            _channel.position(_channel.size());
            _writer = new PositionAwarePhysicalFlushableChannel(_channel);
        }