org.apache.ignite.internal.processors.cache.persistence.defragmentation

## Class LinkMap

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.defragmentation.LinkMap

    public class LinkMap
    extends Object

Class that holds mappings of old links to new links.

### Field Summary

Fields
`static IOVersions<? extends BPlusInnerIO<org.apache.ignite.internal.processors.cache.persistence.defragmentation.LinkMap.LinkMapping>>` `INNER_IO_VERSIONS`
`static IOVersions<? extends BPlusLeafIO<org.apache.ignite.internal.processors.cache.persistence.defragmentation.LinkMap.LinkMapping>>` `LEAF_IO_VERSIONS`
`static int` `META_PAGE_IDX` Tree meta page index.

### Constructor Summary

Constructors
Constructor and Description
`LinkMap(CacheGroupContext ctx, PageMemory pageMem, long metaPageId, boolean initNew)`
`LinkMap(int grpId, String grpName, PageMemory pageMem, long metaPageId, boolean initNew, PageLockTrackerManager pageLockTrackerManager)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Frees the internal allocated resources.
`long` `get(long oldLink)` Get new link by old link.
`void` `put(long oldLink, long newLink)` Add link mapping.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### META_PAGE_IDX

    public static final int META_PAGE_IDX

Tree meta page index.

See Also:
  Constant Field Values

#### LEAF_IO_VERSIONS

    public static final IOVersions<? extends BPlusLeafIO<org.apache.ignite.internal.processors.cache.persistence.defragmentation.LinkMap.LinkMapping>> LEAF_IO_VERSIONS

#### INNER_IO_VERSIONS

    public static final IOVersions<? extends BPlusInnerIO<org.apache.ignite.internal.processors.cache.persistence.defragmentation.LinkMap.LinkMapping>> INNER_IO_VERSIONS

### Constructor Detail

#### LinkMap

    public LinkMap(CacheGroupContext ctx,
                   PageMemory pageMem,
                   long metaPageId,
                   boolean initNew)
            throws IgniteCheckedException

Parameters:
  `ctx` - Cache group context.
  `pageMem` - Page memory.
  `metaPageId` - Meta page id.
  `initNew` - If tree should be (re)created.
Throws:
  `IgniteCheckedException`

#### LinkMap

    public LinkMap(int grpId,
                   String grpName,
                   PageMemory pageMem,
                   long metaPageId,
                   boolean initNew,
                   PageLockTrackerManager pageLockTrackerManager)
            throws IgniteCheckedException

Parameters:
  `grpId` - Cache group id.
  `grpName` - Cache group name.
  `pageMem` - Page memory.
  `metaPageId` - Meta page id.
  `initNew` - If tree should be (re)created.
  `pageLockTrackerManager` - Page lock tracker manager.
Throws:
  `IgniteCheckedException`

### Method Detail

#### put

    public void put(long oldLink,
                    long newLink)
             throws IgniteCheckedException

Add link mapping.

Parameters:
  `oldLink` - Old link.
  `newLink` - New link.
Throws:
  `IgniteCheckedException`

#### get

    public long get(long oldLink)
             throws IgniteCheckedException

Get new link by old link.

Parameters:
  `oldLink` - Old link.
Throws:
  `IgniteCheckedException`

#### close

    public void close()

Frees the internal allocated resources.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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