process(m_beforeFlush, m_events.getEvents());
boolean flushed = m_beforeFlushMarker != null; List events = m_events.getEvents(); for (int i = 0; i < events.size(); i++) { Event ev = (Event) events.get(i); if (flushed) { if (m_beforeFlushMarker.equals(ev)) { flushed = false; } continue; }
    private void flushInternal() {        if (LOG.isDebugEnabled()) {            trace("flush", new Object[] {});        }        process(m_beforeFlush, m_events.getEvents());        computeFlushability();        List written = new LinkedList();        for (Iterator it = m_events.iterator(); it.hasNext(); ) {            Event ev = (Event) it.next();            if (ev.m_flushable) {                m_engine.write(ev);                written.add(ev);                it.remove();            }        }        m_engine.flush();        for (Iterator it = written.iterator(); it.hasNext(); ) {            Event ev = (Event) it.next();            m_eventsChanged = true;            ev.sync();        }        process(m_afterFlush, written);        if (LOG.isInfoEnabled()) {            if (m_events.size() > 0) {                LOG.info("unflushed: " + m_events.size());            }        }        if (LOG.isDebugEnabled()) {            untrace("flush");        }    }