org.apache.ignite.internal.commandline.cache.distribution

## Class CacheDistributionPartition

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.commandline.cache.distribution.CacheDistributionPartition

All Implemented Interfaces:
  Externalizable, Serializable

    public class CacheDistributionPartition
    extends VisorDataTransferObject

DTO for CacheDistributionTask, contains information about partition

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`V1, V2, V3, V4`

### Constructor Summary

Constructors
Constructor and Description
`CacheDistributionPartition()` Default constructor.
`CacheDistributionPartition(int partId, boolean primary, GridDhtPartitionState state, long updateCntr, long size)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getPartition()`
`long` `getSize()`
`GridDhtPartitionState` `getState()`
`long` `getUpdateCounter()`
`boolean` `isPrimary()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`void` `setPartition(int partId)`
`void` `setPrimary(boolean primary)`
`void` `setSize(long size)`
`void` `setState(GridDhtPartitionState state)`
`void` `setUpdateCounter(long updateCntr)`
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`getProtocolVersion, readExternal, toList, toSet, writeExternal`

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

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

### Constructor Detail

#### CacheDistributionPartition

    public CacheDistributionPartition()

Default constructor.

#### CacheDistributionPartition

    public CacheDistributionPartition(int partId,
                                      boolean primary,
                                      GridDhtPartitionState state,
                                      long updateCntr,
                                      long size)

Parameters:
  `partId` - Partition identifier.
  `primary` - Flag primary or backup partition.
  `state` - Partition status.
  `updateCntr` - Partition update counters.
  `size` - Number of entries in partition.

### Method Detail

#### getPartition

    public int getPartition()

#### setPartition

    public void setPartition(int partId)

#### isPrimary

    public boolean isPrimary()

#### setPrimary

    public void setPrimary(boolean primary)

#### getState

    public GridDhtPartitionState getState()

#### setState

    public void setState(GridDhtPartitionState state)

#### getUpdateCounter

    public long getUpdateCounter()

#### setUpdateCounter

    public void setUpdateCounter(long updateCntr)

#### getSize

    public long getSize()

#### setSize

    public void setSize(long size)

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                                    ObjectInput in)
                             throws IOException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021