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 Description IgniteDefragmentationImpl(GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteDefragmentation.CancelResultcancel()Cancel scheduled or ongoing defragmentation.booleaninProgress()intprocessedPartitions()IgniteDefragmentation.ScheduleResultschedule(List<String> cacheNames)Schedule defragmentaton on next start of the node.longstartTime()IgniteDefragmentation.DefragmentationStatusstatus()Get the status of the ongoing defragmentation.inttotalPartitions()
-
-
-
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:
schedulein interfaceIgniteDefragmentation- 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:
cancelin interfaceIgniteDefragmentation- 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:
statusin interfaceIgniteDefragmentation- Returns:
- Defragmentation status.
- Throws:
IgniteCheckedException- If failed.
-
inProgress
public boolean inProgress()
- Specified by:
inProgressin interfaceIgniteDefragmentation- Returns:
trueif there is an ongoing defragmentation.
-
processedPartitions
public int processedPartitions()
- Specified by:
processedPartitionsin interfaceIgniteDefragmentation- Returns:
- Number of processed partitions, or 0 if there is no ongoing defragmentation.
-
totalPartitions
public int totalPartitions()
- Specified by:
totalPartitionsin interfaceIgniteDefragmentation- Returns:
- Number of total partitions, or 0 if there is no ongoing defragmentation.
-
startTime
public long startTime()
- Specified by:
startTimein interfaceIgniteDefragmentation- Returns:
- Timestamp of the beginning of the ongoing defragmentation or 0 if there is none.
-
-