public static boolean isDriverActive ( final File directory , final long driverTimeoutMs , final Consumer < String > logger ) { final File cncFile = new File ( directory , CncFileDescriptor . CNC_FILE ) ; if ( cncFile . exists ( ) && cncFile . length ( ) > 0 ) { logger . accept ( "INFO: Aeron CnC file exists: " + cncFile ) ; final MappedByteBuffer cncByteBuffer = IoUtil . mapExistingFile ( cncFile , "CnC file" ) ; try { return isDriverActive ( driverTimeoutMs , logger , cncByteBuffer ) ; } finally { IoUtil . unmap ( cncByteBuffer ) ; } } return false ; }
Is a media driver active in the given directory?