Class GridOsCacheDrManager
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.dr.GridOsCacheDrManager
-
- All Implemented Interfaces:
GridCacheDrManager,GridCacheManager
public class GridOsCacheDrManager extends Object implements GridCacheDrManager
No-op implementation forGridCacheDrManager.
-
-
Constructor Summary
Constructors Constructor Description GridOsCacheDrManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytedataCenterId()booleanenabled()voidonDisconnected(IgniteFuture reconnectFut)voidonExchange(AffinityTopologyVersion topVer, boolean left, boolean activate)Process partitions exchange event.voidonKernalStart()voidonKernalStop(boolean cancel)voidonReceiveCacheConflictResolved(boolean useNew, boolean useOld, boolean merge)Callback for manual conflict resolution.voidonReceiveCacheEntriesReceived(int entriesCnt)Callback for received entries from receiver hub.voidpartitionEvicted(int part)In case some partition is evicted, we remove entries of this partition from backup queue.voidprintMemoryStats()Prints memory statistics (sizes of internal data structures, etc.).booleanreceiveEnabled()voidreplicate(KeyCacheObject key, @Nullable CacheObject val, long ttl, long expireTime, GridCacheVersion ver, GridDrType drType, AffinityTopologyVersion topVer)Performs replication.voidresetMetrics()Resets metrics for current cache.voidstart(GridCacheContext cctx)Starts manager.voidstop(boolean cancel, boolean destroy)Stops manager.
-
-
-
Method Detail
-
enabled
public boolean enabled()
- Specified by:
enabledin interfaceGridCacheDrManager- Returns:
Trueis DR is enabled.
-
start
public void start(GridCacheContext cctx) throws IgniteCheckedException
Starts manager.- Specified by:
startin interfaceGridCacheManager- Parameters:
cctx- Context.- Throws:
IgniteCheckedException- If failed.
-
stop
public void stop(boolean cancel, boolean destroy)Stops manager.- Specified by:
stopin interfaceGridCacheManager- Parameters:
cancel- Cancel flag.destroy- Cache destroy flag.
-
onKernalStart
public void onKernalStart() throws IgniteCheckedException- Specified by:
onKernalStartin interfaceGridCacheManager- Throws:
IgniteCheckedException- If failed.
-
onKernalStop
public void onKernalStop(boolean cancel)
- Specified by:
onKernalStopin interfaceGridCacheManager- 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:
printMemoryStatsin interfaceGridCacheManager
-
dataCenterId
public byte dataCenterId()
- Specified by:
dataCenterIdin interfaceGridCacheDrManager- Returns:
- Data center ID.
-
replicate
public void replicate(KeyCacheObject key, @Nullable @Nullable CacheObject val, long ttl, long expireTime, GridCacheVersion ver, GridDrType drType, AffinityTopologyVersion topVer)
Performs replication.- Specified by:
replicatein interfaceGridCacheDrManager- Parameters:
key- Key.val- Value.ttl- TTL.expireTime- Expire time.ver- Version.drType- Replication type.topVer- Topology version.
-
onExchange
public void onExchange(AffinityTopologyVersion topVer, boolean left, boolean activate) throws IgniteCheckedException
Process partitions exchange event.- Specified by:
onExchangein interfaceGridCacheDrManager- Parameters:
topVer- Topology version.left-Trueif exchange has been caused by node leave.activate-Trueif exchange has been caused by cluster activation.- 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:
partitionEvictedin interfaceGridCacheDrManager- Parameters:
part- Partition.
-
onReceiveCacheEntriesReceived
public void onReceiveCacheEntriesReceived(int entriesCnt)
Callback for received entries from receiver hub.- Specified by:
onReceiveCacheEntriesReceivedin interfaceGridCacheDrManager- Parameters:
entriesCnt- Number of received entries.
-
onReceiveCacheConflictResolved
public void onReceiveCacheConflictResolved(boolean useNew, boolean useOld, boolean merge)Callback for manual conflict resolution.- Specified by:
onReceiveCacheConflictResolvedin interfaceGridCacheDrManager- Parameters:
useNew- Use new.useOld- Use old.merge- Merge.
-
resetMetrics
public void resetMetrics()
Resets metrics for current cache.- Specified by:
resetMetricsin interfaceGridCacheDrManager
-
receiveEnabled
public boolean receiveEnabled()
- Specified by:
receiveEnabledin interfaceGridCacheDrManager- Returns:
Trueif receives DR data.
-
onDisconnected
public void onDisconnected(IgniteFuture reconnectFut)
- Specified by:
onDisconnectedin interfaceGridCacheManager- Parameters:
reconnectFut- Reconnect future.
-
-