public void flush() throws JournalException
    {
    	if (failing)
    		throw new JournalException("Store journal is failing");
    	
    	boolean newFlushRequired = false;
    	synchronized (journalWriteQueue)
        {
    		if (unflushedJournalSize > maxUnflushedJournalSize)
    		{
    			newFlushRequired = !flushingJournal;
    			if (newFlushRequired)
    				flushingJournal = true;
    			unflushedJournalSize = 0;
    		}
        }
    	
    	// Flush journal to store (asynchronous)
    	if (newFlushRequired)
        {
        	try
        	{
        		asyncTaskManager.execute(flushJournalAsyncTask);
        	}
        	catch (JMSException e)
        	{
        		throw new JournalException("Cannot flush journal asynchronously : "+e);
        	}
        }
    }
public void flush ( ) throws JournalException { if ( failing ) throw new JournalException ( "Store journal is failing" ) ; boolean newFlushRequired = false ; synchronized ( journalWriteQueue ) { if ( unflushedJournalSize > maxUnflushedJournalSize ) { newFlushRequired = ! flushingJournal ; if ( newFlushRequired ) flushingJournal = true ; unflushedJournalSize = 0 ; } } if ( newFlushRequired ) { try { asyncTaskManager . execute ( flushJournalAsyncTask ) ; } catch ( JMSException e ) { throw new JournalException ( "Cannot flush journal asynchronously : " + e ) ; } } }
Flush the journal write queue (asynchronous)