org.apache.ignite.cache

## Enum CachePreloadMode

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

All Implemented Interfaces:
  Serializable, Comparable<CachePreloadMode>

    public enum CachePreloadMode
    extends Enum<CachePreloadMode>

Cache preload mode. When preloading is enabled (i.e. has value other than `NONE`), distributed caches will attempt to preload all necessary values from other grid nodes. This enumeration is used to configure preloading via `CacheConfiguration.getPreloadMode()` configuration property. If not configured explicitly, then `CacheConfiguration.DFLT_PRELOAD_MODE` is used.

Replicated caches will try to load the full set of cache entries from other nodes (or as defined by pluggable `CacheAffinityFunction`), while partitioned caches will only load the entries for which current node is primary or back up.

Note that preload mode only makes sense for `CacheMode.REPLICATED` and `CacheMode.PARTITIONED` caches. Caches with `CacheMode.LOCAL` mode are local by definition and therefore cannot preload any values from neighboring nodes.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ASYNC` Asynchronous preload mode.
`NONE` In this mode no preloading will take place which means that caches will be either loaded on demand from persistent store whenever data is accessed, or will be populated explicitly.
`SYNC` Synchronous preload mode.

### Method Summary

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

#### SYNC

    public static final CachePreloadMode SYNC

Synchronous preload mode. Distributed caches will not start until all necessary data is loaded from other available grid nodes.

#### ASYNC

    public static final CachePreloadMode ASYNC

Asynchronous preload mode. Distributed caches will start immediately and will load all necessary data from other available grid nodes in the background.

#### NONE

    public static final CachePreloadMode NONE

In this mode no preloading will take place which means that caches will be either loaded on demand from persistent store whenever data is accessed, or will be populated explicitly.

### Method Detail

#### values

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

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

#### valueOf

    public static CachePreloadMode 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 CachePreloadMode fromOrdinal(int 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-RC1
Release Date | : February 17 2015