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

## Class IgniteDefragmentationImpl

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

All Implemented Interfaces:
  IgniteDefragmentation

    public class IgniteDefragmentationImpl
    extends Object
    implements IgniteDefragmentation

Defragmentation operation service implementation.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.cache.persistence.defragmentation.IgniteDefragmentation

`IgniteDefragmentation.CancelResult, IgniteDefragmentation.CompletedDefragmentationInfo, IgniteDefragmentation.DefragmentationInfo, IgniteDefragmentation.DefragmentationStatus, IgniteDefragmentation.InProgressDefragmentationInfo, IgniteDefragmentation.ScheduleResult`

### Constructor Summary

Constructors
Constructor and Description
`IgniteDefragmentationImpl(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`IgniteDefragmentation.CancelResult` `cancel()` Cancel scheduled or ongoing defragmentation.
`boolean` `inProgress()`
`int` `processedPartitions()`
`IgniteDefragmentation.ScheduleResult` `schedule(List<String> cacheNames)` Schedule defragmentaton on next start of the node.
`long` `startTime()`
`IgniteDefragmentation.DefragmentationStatus` `status()` Get the status of the ongoing defragmentation.
`int` `totalPartitions()`

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

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

### Constructor Detail

#### IgniteDefragmentationImpl

    public IgniteDefragmentationImpl(GridKernalContext ctx)

### Method Detail

#### schedule

    public IgniteDefragmentation.ScheduleResult schedule(List<String> cacheNames)
                                                  throws IgniteCheckedException

Schedule defragmentaton on next start of the node.

Specified by:
  `schedule` in interface `IgniteDefragmentation`
Parameters:
  `cacheNames` - Names of caches to run defragmentation on.
Returns:
  Result of the scheduling.
Throws:
  `IgniteCheckedException` - If failed.

#### cancel

    public IgniteDefragmentation.CancelResult cancel()
                                              throws IgniteCheckedException

Cancel scheduled or ongoing defragmentation.

Specified by:
  `cancel` in interface `IgniteDefragmentation`
Returns:
  Result of the cancellation.
Throws:
  `IgniteCheckedException` - If failed.

#### status

    public IgniteDefragmentation.DefragmentationStatus status()
                                                       throws IgniteCheckedException

Get the status of the ongoing defragmentation.

Specified by:
  `status` in interface `IgniteDefragmentation`
Returns:
  Defragmentation status.
Throws:
  `IgniteCheckedException` - If failed.

#### inProgress

    public boolean inProgress()

Specified by:
  `inProgress` in interface `IgniteDefragmentation`
Returns:
  `true` if there is an ongoing defragmentation.

#### processedPartitions

    public int processedPartitions()

Specified by:
  `processedPartitions` in interface `IgniteDefragmentation`
Returns:
  Number of processed partitions, or 0 if there is no ongoing defragmentation.

#### totalPartitions

    public int totalPartitions()

Specified by:
  `totalPartitions` in interface `IgniteDefragmentation`
Returns:
  Number of total partitions, or 0 if there is no ongoing defragmentation.

#### startTime

    public long startTime()

Specified by:
  `startTime` in interface `IgniteDefragmentation`
Returns:
  Timestamp of the beginning of the ongoing defragmentation or 0 if there is none.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021