public static DBContext offlineInstance ( String name ) { DB db = DBMaker . fileDB ( name ) . fileMmapEnableIfSupported ( ) . closeOnJvmShutdown ( ) . cleanerHackEnable ( ) . transactionEnable ( ) . fileDeleteAfterClose ( ) . make ( ) ; return new MapDBContext ( db ) ; }
This DB returned by this method gets deleted on JVM shutdown .