public VoltMessage drain()
    {
        if (!m_mustDrain || m_replayEntries.isEmpty()) {
            return null;
        }
        VoltMessage head = m_replayEntries.firstEntry().getValue().drain();
        while (head == null) {
            m_replayEntries.pollFirstEntry();
            if (!m_replayEntries.isEmpty()) {
                // This will end up null if the next ReplayEntry was just a sentinel.
                // We'll keep going.
                head = m_replayEntries.firstEntry().getValue().drain();
            }
            else {
                break;
            }
        }
        return head;
    }
public VoltMessage drain ( ) { if ( ! m_mustDrain || m_replayEntries . isEmpty ( ) ) { return null ; } VoltMessage head = m_replayEntries . firstEntry ( ) . getValue ( ) . drain ( ) ; while ( head == null ) { m_replayEntries . pollFirstEntry ( ) ; if ( ! m_replayEntries . isEmpty ( ) ) { head = m_replayEntries . firstEntry ( ) . getValue ( ) . drain ( ) ; } else { break ; } } return head ; }
starts returning messages, poll() will always return null