org.apache.ignite.cache

## Enum CachePeekMode

- java.lang.Object
- - java.lang.Enum<CachePeekMode>
  - - org.apache.ignite.cache.CachePeekMode

All Implemented Interfaces:
  Serializable, Comparable<CachePeekMode>

    public enum CachePeekMode
    extends Enum<CachePeekMode>

Enumeration of all supported cache peek modes. Peek modes can be passed into `IgniteCache.localPeek(Object, CachePeekMode...)`, `IgniteCache.localEntries(CachePeekMode...)`, `IgniteCache.localSize(CachePeekMode...)` and `IgniteCache.size(CachePeekMode...)` methods.

The following modes are supported:

- `ALL`
- `NEAR`
- `PRIMARY`
- `BACKUP`
- `ONHEAP`
- `OFFHEAP`
- `SWAP`

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ALL` Peeks into all available cache storages.
`BACKUP` Peek value from backup copies of partitioned cache only (skip near cache).
`NEAR` Peek into near cache only (don't peek into partitioned cache).
`OFFHEAP` Peeks value from the off-heap storage only, without loading off-heap value into cache.
`ONHEAP` Peeks value from the on-heap storage only.
`PRIMARY` Peek value from primary copy of partitioned cache only (skip near cache).
`SWAP` Peeks value from the swap storage only, without loading swapped value into cache.

### Method Summary

Methods
`static CachePeekMode` `fromOrdinal(byte ord)` Efficiently gets enumerated value from its ordinal.
`static CachePeekMode` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static CachePeekMode[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ALL

    public static final CachePeekMode ALL

Peeks into all available cache storages.

#### NEAR

    public static final CachePeekMode NEAR

Peek into near cache only (don't peek into partitioned cache). In case of `CacheMode.LOCAL` cache, behaves as `ALL` mode.

#### PRIMARY

    public static final CachePeekMode PRIMARY

Peek value from primary copy of partitioned cache only (skip near cache). In case of `CacheMode.LOCAL` cache, behaves as `ALL` mode.

#### BACKUP

    public static final CachePeekMode BACKUP

Peek value from backup copies of partitioned cache only (skip near cache). In case of `CacheMode.LOCAL` cache, behaves as `ALL` mode.

#### ONHEAP

    public static final CachePeekMode ONHEAP

Peeks value from the on-heap storage only.

#### OFFHEAP

    public static final CachePeekMode OFFHEAP

Peeks value from the off-heap storage only, without loading off-heap value into cache.

#### SWAP

    public static final CachePeekMode SWAP

Peeks value from the swap storage only, without loading swapped value into cache.

### Method Detail

#### values

    public static CachePeekMode[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (CachePeekMode c : CachePeekMode.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static CachePeekMode valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

#### fromOrdinal

    @Nullable
    public static CachePeekMode fromOrdinal(byte ord)

Efficiently gets enumerated value from its ordinal.

Parameters:
  `ord` - Ordinal value.
Returns:
  Enumerated value or `null` if ordinal out of range.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.3.0-incubating
Release Date | : July 10 2015