org.apache.ignite.internal.processors.cache

## Enum GridCachePeekMode

- java.lang.Object
- - java.lang.Enum<GridCachePeekMode>
  - - org.apache.ignite.internal.processors.cache.GridCachePeekMode

All Implemented Interfaces:
  Serializable, Comparable<GridCachePeekMode>

    public enum GridCachePeekMode
    extends Enum<GridCachePeekMode>

Enumeration of all supported cache peek modes. Peek modes can be passed into various `'CacheProjection.peek(..)'` and `Entry.peek(..)` methods, such as `CacheProjection.peek(Object, Collection)`, `org.apache.ignite.cache.Entry#peek()`, and others.

The following modes are supported:

- `TX`
- `GLOBAL`
- `SMART`
- `SWAP`
- `DB`

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`DB` Peek value from the underlying persistent storage without loading this value into cache.
`GLOBAL` Peeks at cache global (not in-transaction) memory.
`NEAR_ONLY` Peek value from near cache only (don't peek from partitioned cache).
`PARTITIONED_ONLY` Peek value from partitioned cache only (skip near cache).
`SMART` In this mode value is peeked from in-transaction memory first using `TX` mode and then, if it has not been found there, `GLOBAL` mode is used to search in committed cached values.
`SWAP` Peeks value only from off-heap or cache swap storage without loading swapped value into cache.
`TX` Peeks value only from in-transaction memory of an ongoing transaction, if any.

### Method Summary

Methods
`static GridCachePeekMode` `fromOrdinal(byte ord)` Efficiently gets enumerated value from its ordinal.
`static GridCachePeekMode` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static GridCachePeekMode[]` `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

#### TX

    public static final GridCachePeekMode TX

Peeks value only from in-transaction memory of an ongoing transaction, if any.

#### GLOBAL

    public static final GridCachePeekMode GLOBAL

Peeks at cache global (not in-transaction) memory.

#### SMART

    public static final GridCachePeekMode SMART

In this mode value is peeked from in-transaction memory first using `TX` mode and then, if it has not been found there, `GLOBAL` mode is used to search in committed cached values.

#### SWAP

    public static final GridCachePeekMode SWAP

Peeks value only from off-heap or cache swap storage without loading swapped value into cache.

#### DB

    public static final GridCachePeekMode DB

Peek value from the underlying persistent storage without loading this value into cache.

#### NEAR_ONLY

    public static final GridCachePeekMode NEAR_ONLY

Peek value from near cache only (don't peek from partitioned cache). In case of `CacheMode.LOCAL` or `CacheMode.REPLICATED` cache, behaves as `GLOBAL` mode.

#### PARTITIONED_ONLY

    public static final GridCachePeekMode PARTITIONED_ONLY

Peek value from partitioned cache only (skip near cache). In case of `CacheMode.LOCAL` or `CacheMode.REPLICATED` cache, behaves as `GLOBAL` mode.

### Method Detail

#### values

    public static GridCachePeekMode[] 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 (GridCachePeekMode c : GridCachePeekMode.values())
        System.out.println(c);

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

#### valueOf

    public static GridCachePeekMode 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 GridCachePeekMode 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.0.0-RC3
Release Date | : March 24 2015