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

## Class GridOsCacheDrManager

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.dr.os.GridOsCacheDrManager

All Implemented Interfaces:
  GridCacheDrManager, GridCacheManager

    public class GridOsCacheDrManager
    extends Object
    implements GridCacheDrManager

No-op implementation for `GridCacheDrManager`.

### Constructor Summary

Constructors
Constructor and Description
`GridOsCacheDrManager()`

### Method Summary

Methods
`void` `beforeExchange(long topVer, boolean left)` Process partitions "before exchange" event.
`GridCacheVersionAbstractConflictResolver` `conflictResolver()`
`byte` `dataCenterId()`
`boolean` `enabled()`
`void` `onKernalStart()`
`void` `onKernalStop(boolean cancel)`
`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.
`void` `printMemoryStats()` Prints memory statistics (sizes of internal data structures, etc.).
`boolean` `receiveEnabled()`
`void` `replicate(KeyCacheObject key, CacheObject val, long ttl, long expireTime, GridCacheVersion ver, GridDrType drType)` Performs replication.
`void` `resetMetrics()` Resets metrics for current cache.
`void` `start(GridCacheContext cctx)` Starts manager.
`void` `stop(boolean cancel)` Stops manager.

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

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

### Constructor Detail

#### GridOsCacheDrManager

    public GridOsCacheDrManager()

### Method Detail

#### enabled

    public boolean enabled()

Specified by:
  `enabled` in interface `GridCacheDrManager`
Returns:
  `True` is DR is enabled.

#### start

    public void start(GridCacheContext cctx)
               throws IgniteCheckedException

Starts manager.

Specified by:
  `start` in interface `GridCacheManager`
Parameters:
  `cctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### stop

    public void stop(boolean cancel)

Stops manager.

Specified by:
  `stop` in interface `GridCacheManager`
Parameters:
  `cancel` - Cancel flag.

#### onKernalStart

    public void onKernalStart()
                       throws IgniteCheckedException

Specified by:
  `onKernalStart` in interface `GridCacheManager`
Throws:
  `IgniteCheckedException` - If failed.

#### onKernalStop

    public void onKernalStop(boolean cancel)

Specified by:
  `onKernalStop` in interface `GridCacheManager`
Parameters:
  `cancel` - Cancel flag.

#### printMemoryStats

    public void printMemoryStats()

Prints memory statistics (sizes of internal data structures, etc.). NOTE: this method is for testing and profiling purposes only.

Specified by:
  `printMemoryStats` in interface `GridCacheManager`

#### dataCenterId

    public byte dataCenterId()

Specified by:
  `dataCenterId` in interface `GridCacheDrManager`
Returns:
  Data center ID.

#### conflictResolver

    public GridCacheVersionAbstractConflictResolver conflictResolver()

Specified by:
  `conflictResolver` in interface `GridCacheDrManager`
Returns:
  Cache version conflict resolver.

#### replicate

    public void replicate(KeyCacheObject key,
                 @Nullable
                 CacheObject val,
                 long ttl,
                 long expireTime,
                 GridCacheVersion ver,
                 GridDrType drType)

Performs replication.

Specified by:
  `replicate` in interface `GridCacheDrManager`
Parameters:
  `key` - Key.
  `val` - Value.
  `ttl` - TTL.
  `expireTime` - Expire time.
  `ver` - Version.
  `drType` - Replication type.

#### beforeExchange

    public void beforeExchange(long topVer,
                      boolean left)
                        throws IgniteCheckedException

Process partitions "before exchange" event.

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

#### partitionEvicted

    public void partitionEvicted(int part)

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

Specified by:
  `partitionEvicted` in interface `GridCacheDrManager`
Parameters:
  `part` - Partition.

#### onReceiveCacheEntriesReceived

    public void onReceiveCacheEntriesReceived(int entriesCnt)

Callback for received entries from receiver hub.

Specified by:
  `onReceiveCacheEntriesReceived` in interface `GridCacheDrManager`
Parameters:
  `entriesCnt` - Number of received entries.

#### onReceiveCacheConflictResolved

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

Callback for manual conflict resolution.

Specified by:
  `onReceiveCacheConflictResolved` in interface `GridCacheDrManager`
Parameters:
  `useNew` - Use new.
  `useOld` - Use old.
  `merge` - Merge.

#### resetMetrics

    public void resetMetrics()

Resets metrics for current cache.

Specified by:
  `resetMetrics` in interface `GridCacheDrManager`

#### receiveEnabled

    public boolean receiveEnabled()

Specified by:
  `receiveEnabled` in interface `GridCacheDrManager`
Returns:
  `True` if receives DR data.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC3
Release Date | : March 24 2015