org.apache.ignite.internal.visor.cache

## Class VisorCache

- java.lang.Object
- - org.apache.ignite.internal.visor.cache.VisorCache

All Implemented Interfaces:
  Serializable

    public class VisorCache
    extends Object
    implements Serializable

Data transfer object for `IgniteCache`.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`VisorCache()`

### Method Summary

Methods
`Collection<IgnitePair<Integer>>` `backupPartitions()`
`void` `backupPartitions(Collection<IgnitePair<Integer>> backupParts)`
`int` `dhtSize()`
`void` `dhtSize(int dhtSize)`
`static VisorCache` `from(Ignite ignite, GridCache c, int sample)`
`VisorCache` `history()`
`long` `memorySize()`
`void` `memorySize(long memorySize)`
`VisorCacheMetrics` `metrics()`
`void` `metrics(VisorCacheMetrics metrics)`
`CacheMode` `mode()`
`void` `mode(CacheMode mode)`
`String` `name()`
`void` `name(String name)`
`int` `nearSize()`
`void` `nearSize(int nearSize)`
`long` `offHeapAllocatedSize()`
`void` `offHeapAllocatedSize(long offHeapAllocatedSize)`
`long` `offHeapEntriesCount()`
`void` `offHeapEntriesCount(long offHeapEntriesCnt)`
`GridDhtPartitionMap` `partitionMap()`
`void` `partitionMap(GridDhtPartitionMap partsMap)`
`int` `partitions()`
`void` `partitions(int partsCnt)`
`Collection<IgnitePair<Integer>>` `primaryPartitions()`
`void` `primaryPartitions(Collection<IgnitePair<Integer>> primaryParts)`
`int` `primarySize()`
`void` `primarySize(int primarySize)`
`int` `size()`
`void` `size(int size)`
`long` `swapKeys()`
`void` `swapKeys(long swapKeys)`
`long` `swapSize()`
`void` `swapSize(long swapSize)`
`String` `toString()`

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

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

### Constructor Detail

#### VisorCache

    public VisorCache()

### Method Detail

#### from

    public static VisorCache from(Ignite ignite,
                  GridCache c,
                  int sample)
                           throws IgniteCheckedException

Parameters:
  `ignite` - Grid.
  `c` - Actual cache.
  `sample` - Sample size.
Returns:
  Data transfer object for given cache.
Throws:
  `IgniteCheckedException`

#### history

    public VisorCache history()

Returns:
  New instance suitable to store in history.

#### name

    public String name()

Returns:
  Cache name.

#### name

    public void name(String name)

Parameters:
  `name` - New cache name.

#### mode

    public CacheMode mode()

Returns:
  Cache mode.

#### mode

    public void mode(CacheMode mode)

Parameters:
  `mode` - New cache mode.

#### memorySize

    public long memorySize()

Returns:
  Cache size in bytes.

#### memorySize

    public void memorySize(long memorySize)

Parameters:
  `memorySize` - New cache size in bytes.

#### size

    public int size()

Returns:
  Number of all entries in cache.

#### size

    public void size(int size)

Parameters:
  `size` - New number of all entries in cache.

#### nearSize

    public int nearSize()

Returns:
  Number of all entries in near cache.

#### nearSize

    public void nearSize(int nearSize)

Parameters:
  `nearSize` - New number of all entries in near cache.

#### dhtSize

    public int dhtSize()

Returns:
  Number of all entries in DHT cache.

#### dhtSize

    public void dhtSize(int dhtSize)

Parameters:
  `dhtSize` - New number of all entries in DHT cache.

#### primarySize

    public int primarySize()

Returns:
  Number of primary entries in cache.

#### primarySize

    public void primarySize(int primarySize)

Parameters:
  `primarySize` - New number of primary entries in cache.

#### offHeapAllocatedSize

    public long offHeapAllocatedSize()

Returns:
  Memory size allocated in off-heap.

#### offHeapAllocatedSize

    public void offHeapAllocatedSize(long offHeapAllocatedSize)

Parameters:
  `offHeapAllocatedSize` - New memory size allocated in off-heap.

#### offHeapEntriesCount

    public long offHeapEntriesCount()

Returns:
  Number of cache entries stored in off-heap memory.

#### offHeapEntriesCount

    public void offHeapEntriesCount(long offHeapEntriesCnt)

Parameters:
  `offHeapEntriesCnt` - New number of cache entries stored in off-heap memory.

#### swapSize

    public long swapSize()

Returns:
  Size in bytes for swap space.

#### swapSize

    public void swapSize(long swapSize)

Parameters:
  `swapSize` - New size in bytes for swap space.

#### swapKeys

    public long swapKeys()

Returns:
  Number of cache entries stored in swap space.

#### swapKeys

    public void swapKeys(long swapKeys)

Parameters:
  `swapKeys` - New number of cache entries stored in swap space.

#### partitions

    public int partitions()

Returns:
  Number of partitions.

#### partitions

    public void partitions(int partsCnt)

Parameters:
  `partsCnt` - New number of partitions.

#### primaryPartitions

    public Collection<IgnitePair<Integer>> primaryPartitions()

Returns:
  Primary partitions IDs with sizes.

#### primaryPartitions

    public void primaryPartitions(Collection<IgnitePair<Integer>> primaryParts)

Parameters:
  `primaryParts` - New primary partitions IDs with sizes.

#### backupPartitions

    public Collection<IgnitePair<Integer>> backupPartitions()

Returns:
  Backup partitions IDs with sizes.

#### backupPartitions

    public void backupPartitions(Collection<IgnitePair<Integer>> backupParts)

Parameters:
  `backupParts` - New backup partitions IDs with sizes.

#### metrics

    public VisorCacheMetrics metrics()

Returns:
  Cache metrics.

#### metrics

    public void metrics(VisorCacheMetrics metrics)

Parameters:
  `metrics` - New cache metrics.

#### partitionMap

    @Nullable
    public GridDhtPartitionMap partitionMap()

Returns:
  Cache partitions states.

#### partitionMap

    public void partitionMap(@Nullable
                    GridDhtPartitionMap partsMap)

Parameters:
  `partsMap` - New cache partitions states.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015