@ Override protected synchronized JournalInputFile openNextFile ( ) throws JournalException { while ( open ) { JournalInputFile nextFile = super . openNextFile ( ) ; if ( nextFile != null ) { return nextFile ; } try { wait ( pollingIntervalMillis ) ; } catch ( InterruptedException e ) { // no special action on interrupt. } } return null ; }
Ask for a new file using the superclass method but if none is found wait for a while and ask again . This will continue until we get a server shutdown signal .