org.apache.ignite.internal.processors.cache.distributed.dht.preloader

## Class CachePartitionFullCountersMap

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.distributed.dht.preloader.CachePartitionFullCountersMap

All Implemented Interfaces:
  Serializable

    public class CachePartitionFullCountersMap
    extends Object
    implements Serializable

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CachePartitionFullCountersMap(CachePartitionFullCountersMap other)`
`CachePartitionFullCountersMap(int partsCnt)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `clear()` Clears full counters map.
`long` `initialUpdateCounter(int p)` Gets an initial update counter by the partition ID.
`void` `initialUpdateCounter(int p, long initialUpdCntr)` Sets an initial update counter by the partition ID.
`CachePartitionPartialCountersMap` `subMap(Set<Integer> parts)` Creates submap for provided partition IDs.
`static Map<Integer,T2<Long,Long>>` `toCountersMap(CachePartitionFullCountersMap map)`
`long` `updateCounter(int p)` Gets an update counter by the partition ID.
`void` `updateCounter(int p, long updCntr)` Sets an update counter by the partition ID.

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

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

### Constructor Detail

#### CachePartitionFullCountersMap

    public CachePartitionFullCountersMap(CachePartitionFullCountersMap other)

Parameters:
  `other` - Map to copy.

#### CachePartitionFullCountersMap

    public CachePartitionFullCountersMap(int partsCnt)

Parameters:
  `partsCnt` - Total number of partitions.

### Method Detail

#### initialUpdateCounter

    public long initialUpdateCounter(int p)

Gets an initial update counter by the partition ID.

Parameters:
  `p` - Partition ID.
Returns:
  Initial update counter for the partition with the given ID.

#### updateCounter

    public long updateCounter(int p)

Gets an update counter by the partition ID.

Parameters:
  `p` - Partition ID.
Returns:
  Update counter for the partition with the given ID.

#### initialUpdateCounter

    public void initialUpdateCounter(int p,
                                     long initialUpdCntr)

Sets an initial update counter by the partition ID.

Parameters:
  `p` - Partition ID.
  `initialUpdCntr` - Initial update counter to set.

#### updateCounter

    public void updateCounter(int p,
                              long updCntr)

Sets an update counter by the partition ID.

Parameters:
  `p` - Partition ID.
  `updCntr` - Update counter to set.

#### subMap

    public CachePartitionPartialCountersMap subMap(Set<Integer> parts)

Creates submap for provided partition IDs.

Parameters:
  `parts` - Partition IDs.
Returns:
  Partial counters map.

#### clear

    public void clear()

Clears full counters map.

#### toCountersMap

    public static Map<Integer,T2<Long,Long>> toCountersMap(CachePartitionFullCountersMap map)

Parameters:
  `map` - Full counters map.
Returns:
  Regular java map with counters.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018