Exemplo n.º 1
0
 public void close() throws IOException {
   flush();
   for (final MappedFileChannel mfc : mfChannels) {
     try {
       mfc.close();
     } catch (final IOException ignored) {
     }
   }
 }
Exemplo n.º 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);
     }
   }
 }