Пример #1
0
 @Override
 public void close() throws IOException {
   MMFUtil.unmap(indexMappedByteBuffer);
   indexMappedByteBuffer = null;
   super.close();
 }
Пример #2
0
 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());
 }