@Override public void close() throws IOException { MMFUtil.unmap(indexMappedByteBuffer); indexMappedByteBuffer = null; super.close(); }
public void reMap() throws IOException { ensureNotClosed(); MMFUtil.unmap(indexMappedByteBuffer); this.indexChannel.truncate(INDEX_ITEM_LENGTH * toAppendIndex.get()); indexMappedByteBuffer = this.indexChannel.map(MapMode.READ_ONLY, 0, this.indexChannel.size()); }