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