예제 #1
0
 public void close() throws IOException {
   flush();
   for (final MappedFileChannel mfc : mfChannels) {
     try {
       mfc.close();
     } catch (final IOException ignored) {
     }
   }
 }
예제 #2
0
 public void flush() throws IOException {
   for (final MappedFileChannel mfc : mfChannels) {
     try {
       mfc.flush();
     } catch (final IOException ignored) {
     }
   }
   for (final Field f : getClass().getDeclaredFields()) {
     if (!FieldModel.class.isAssignableFrom(f.getType())) {
       continue;
     }
     f.setAccessible(true);
     try {
       final FieldModel fm = (FieldModel) f.get(this);
       fm.flush();
     } catch (final IllegalAccessException e) {
       throw new AssertionError(e);
     }
   }
 }