org.apache.ignite.internal.processors.cache.dr

## Interface GridCacheDrManager

All Superinterfaces:
  GridCacheManager

All Known Implementing Classes:
  GridOsCacheDrManager

    public interface GridCacheDrManager
    extends GridCacheManager

Replication manager class which processes all replication events.

### Method Summary

Methods
`byte` `dataCenterId()`
`boolean` `enabled()`
`void` `onExchange(AffinityTopologyVersion topVer, boolean left)` Process partitions exchange event.
`void` `onReceiveCacheConflictResolved(boolean useNew, boolean useOld, boolean merge)` Callback for manual conflict resolution.
`void` `onReceiveCacheEntriesReceived(int entriesCnt)` Callback for received entries from receiver hub.
`void` `partitionEvicted(int part)` In case some partition is evicted, we remove entries of this partition from backup queue.
`boolean` `receiveEnabled()`
`void` `replicate(KeyCacheObject key, CacheObject val, long ttl, long expireTime, GridCacheVersion ver, GridDrType drType, AffinityTopologyVersion topVer)` Performs replication.
`void` `resetMetrics()` Resets metrics for current cache.

### Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheManager

`onDisconnected, onKernalStart, onKernalStop, printMemoryStats, start, stop`

### Method Detail

#### dataCenterId

    byte dataCenterId()

Returns:
  Data center ID.

#### replicate

    void replicate(KeyCacheObject key,
                 @Nullable
                 CacheObject val,
                 long ttl,
                 long expireTime,
                 GridCacheVersion ver,
                 GridDrType drType,
                 AffinityTopologyVersion topVer)
                   throws IgniteCheckedException

Performs replication.

Parameters:
  `key` - Key.
  `val` - Value.
  `ttl` - TTL.
  `expireTime` - Expire time.
  `ver` - Version.
  `drType` - Replication type.
  `topVer` - Topology version.
Throws:
  `IgniteCheckedException` - If failed.

#### onExchange

    void onExchange(AffinityTopologyVersion topVer,
                  boolean left)
                    throws IgniteCheckedException

Process partitions exchange event.

Parameters:
  `topVer` - Topology version.
  `left` - `True` if exchange has been caused by node leave.
Throws:
  `IgniteCheckedException` - If failed.

#### enabled

    boolean enabled()

Returns:
  `True` is DR is enabled.

#### receiveEnabled

    boolean receiveEnabled()

Returns:
  `True` if receives DR data.

#### partitionEvicted

    void partitionEvicted(int part)

In case some partition is evicted, we remove entries of this partition from backup queue.

Parameters:
  `part` - Partition.

#### onReceiveCacheEntriesReceived

    void onReceiveCacheEntriesReceived(int entriesCnt)

Callback for received entries from receiver hub.

Parameters:
  `entriesCnt` - Number of received entries.

#### onReceiveCacheConflictResolved

    void onReceiveCacheConflictResolved(boolean useNew,
                                      boolean useOld,
                                      boolean merge)

Callback for manual conflict resolution.

Parameters:
  `useNew` - Use new.
  `useOld` - Use old.
  `merge` - Merge.

#### resetMetrics

    void resetMetrics()

Resets metrics for current cache.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017