@Override
  public ByteBuffer getEntireSegmentSlice() throws MetadataException {
    if (segOffsetLst.size() != 1
        || segOffsetLst.get(0) != SchemaFileConfig.PAGE_HEADER_SIZE
        || spareSize != 0
        || spareOffset != this.pageBuffer.capacity() - SchemaFileConfig.SEG_OFF_DIG) {
      throw new MetadataException(
          "SegmentedPage can share entire buffer slice only when it contains one MAX SIZE segment.");
    }
    // buffer may be modified, segment instance shall be abolished
    segCacheMap.clear();
    synchronized (this.pageBuffer) {
      this.pageBuffer.position(SchemaFileConfig.PAGE_HEADER_SIZE);
      this.pageBuffer.limit(this.pageBuffer.capacity() - SchemaFileConfig.SEG_OFF_DIG);
      return this.pageBuffer.slice();
    }
  }
Implementing marking deletion will not modify {@linkplain #memberNum} nor truncate {@linkplain
#segOffsetLst}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/SegmentedPage.java