org.apache.ignite.internal.processors.cache.persistence.tree.reuse

## Interface ReuseList

All Known Implementing Classes:
  AbstractFreeList, CacheFreeList, PartitionMetaStorageImpl, ReuseListImpl

    public interface ReuseList

Reuse list.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addForRecycle(ReuseBag bag)`
`long` `initRecycledPage(long pageId, byte flag, @Nullable PageIO initIO)` Converts recycled page id back to a usable id.
`long` `recycledPagesCount()`
`long` `takeRecycledPage()`

### Method Detail

#### addForRecycle

    void addForRecycle(ReuseBag bag)
                throws IgniteCheckedException

Parameters:
  `bag` - Reuse bag.
Throws:
  `IgniteCheckedException` - If failed.

#### takeRecycledPage

    long takeRecycledPage()
                   throws IgniteCheckedException

Returns:
  Page ID or `0` if none available.
Throws:
  `IgniteCheckedException` - If failed.

#### recycledPagesCount

    long recycledPagesCount()
                     throws IgniteCheckedException

Returns:
  Number of recycled pages it contains.
Throws:
  `IgniteCheckedException` - If failed.

#### initRecycledPage

    long initRecycledPage(long pageId,
                          byte flag,
                          @Nullable
                          @Nullable PageIO initIO)
                   throws IgniteCheckedException

Converts recycled page id back to a usable id. Might modify page content as well if flag is changing.

Parameters:
  `pageId` - Id of the recycled page.
  `flag` - Flag value for the page. One of `PageIdAllocator.FLAG_DATA`, `PageIdAllocator.FLAG_IDX` or `PageIdAllocator.FLAG_AUX`.
  `initIO` - Page IO to reinit reused page.
Returns:
  Updated page id.
Throws:
  `IgniteCheckedException` - If failed.
See Also:
  `FullPageId`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023