class CacheDistributionPartition extends VisorDataTransferObject {
    /** */
    private static final long serialVersionUID = 0L;

    /** Partition identifier. */
    private int partId;

    /** Flag primary or backup partition. */
    private boolean primary;

    /** Partition status. */
    private GridDhtPartitionState state;

    /** Partition update counters. */
    private long updateCntr;

    /** Number of entries in partition. */
    private long size;

    /** Default constructor. */
    public CacheDistributionPartition() {
    }

    /**
     * @param partId Partition identifier.
     * @param primary Flag primary or backup partition.
     * @param state Partition status.
     * @param updateCntr Partition update counters.
     * @param size Number of entries in partition.
     */
    public CacheDistributionPartition(int partId, boolean primary,
        GridDhtPartitionState state, long updateCntr, long size) {
        this.partId = partId;
        this.primary = primary;
        this.state = state;
        this.updateCntr = updateCntr;
        this.size = size;
    }

    /** */
    public int getPartition() {
        return partId;
    }

    /** */
    public void setPartition(int partId) {
        this.partId = partId;
    }

    /** */
    public boolean isPrimary() {
        return primary;
    }

    /** */
    public void setPrimary(boolean primary) {
        this.primary = primary;
    }

    /** */
    public GridDhtPartitionState getState() {
        return state;
    }

    /** */
    public void setState(GridDhtPartitionState state) {
        this.state = state;
    }

    /** */
    public long getUpdateCounter() {
        return updateCntr;
    }

    /** */
    public void setUpdateCounter(long updateCntr) {
        this.updateCntr = updateCntr;
    }

    /** */
    public long getSize() {
        return size;
    }

    /** */
    public void setSize(long size) {
        this.size = size;
    }

    /** {@inheritDoc} */
    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
        out.writeInt(partId);
        out.writeBoolean(primary);
        U.writeEnum(out, state);
        out.writeLong(updateCntr);
        out.writeLong(size);
    }

    /** {@inheritDoc} */
    @Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException {<FILL_FUNCTION_BODY>}
}

        partId = in.readInt();
        primary = in.readBoolean();
        state = GridDhtPartitionState.fromOrdinal(in.readByte());
        updateCntr = in.readLong();
        size = in.readLong();
    
<methods>public non-sealed void <init>() ,public byte getProtocolVersion() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final int MAGIC,protected static final byte V1,protected static final byte V2,protected static final byte V3,protected static final byte V4,protected static final byte V5,private static final long serialVersionUID