synchronized private void updateMark()

in activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java [334:355]


    synchronized private void updateMark(Location mark) throws IOException {
        // If we wrote a mark we may need to deactivate some log files.
        this.lastMark = mark;
        while (firstActiveNode != appendNode) {
            if (firstActiveNode.getId() < lastMark.getLogFileId()) {
                
                if( archiveDirectory!=null ) {
                    File file = getArchiveFile(firstActiveNode.getId());
                    firstActiveNode.getLogFile().copyTo(file);
                }
                
                firstActiveNode.deactivate();
                activeLogFileCount.decrementAndGet();
                if( firstInactiveNode == null )
                    firstInactiveNode = firstActiveNode;
                firstActiveNode = firstActiveNode.getNextActive();
                
            } else {
                break;
            }
        }
    }