if( m_violations.size() == 0 && m_events.size() > 0 ) flush();
    private void flushInternal() {        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;            }            m_beforeFlushMarker = ev;            for (Iterator eps = m_beforeFlush.iterator(); eps.hasNext(); ) {                EventProcessor ep = (EventProcessor) eps.next();                ep.write(ev);            }        }        for (Iterator it = m_beforeFlush.iterator(); it.hasNext(); ) {            EventProcessor ep = (EventProcessor) it.next();            ep.flush();        }        List written = new LinkedList();        Event prev = null;        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();                if (ev.equals(m_beforeFlushMarker)) {                    m_beforeFlushMarker = prev;                }            } else {                prev = ev;            }        }        m_engine.flush();        for (Iterator it = written.iterator(); it.hasNext(); ) {            Event ev = (Event) it.next();            ev.sync();        }        computeFlushability();        process(m_afterFlush, written);        if (LOG.isInfoEnabled()) {            if (m_events.size() > 0) {                LOG.info("unflushed: " + m_events.size());            }        }        if (LOG.isDebugEnabled()) {            if (m_events.size() > 0) {                LOG.debug("events: " + m_events.getEvents());                LOG.debug("violations: " + m_violations);            }        }    }