Public Member Functions | List of all members
GridGain.DataCenterReplication.IDataCenterReplication Interface Reference

Data Center Replication (DR) interface. More...

Public Member Functions

IFuture StartStateTransfer (string cacheName, params byte[] dataCenterIds)
 Starts full state transfer for the given sender cache. More...
 
ICollection< ICacheDrStateTransfer > GetStateTransfers (string cacheName)
 List all currently active state transfer for the given sender cache. More...
 
void Pause (string cacheName)
 Pauses data center replication for particular sender cache. More...
 
void Resume (string cacheName)
 Resumes data center replication for particular sender cache. More...
 
ICacheDrStatus GetSenderCacheStatus (string cacheName)
 Gets data center replication status for particular sender cache. More...
 
ICacheDrSenderMetrics GetSenderCacheMetrics (string cacheName)
 Gets sender cache metrics. More...
 
ICacheDrReceiverMetrics GetReceiverCacheMetrics (string cacheName)
 Gets receiver cache metrics. More...
 
IDrSenderInMetrics GetSenderInMetrics (string cacheName)
 Gets sender hub incoming data metrics for specified sender cache. More...
 
IDrSenderInMetrics GetSenderAggregatedInMetrics ()
 Gets sender hub incoming data metrics aggregated across all caches. More...
 
IDrSenderOutMetrics GetSenderOutMetrics (byte destDataCenterId, string cacheName)
 Gets sender hub outgoing data metrics for the given remote data center ID and cache name. More...
 
IDrSenderOutMetrics GetSenderAggregatedOutMetrics (byte destDataCenterId)
 Gets sender hub outgoing data metrics aggregated across all cache names for the given remote data center ID. More...
 
IDrSenderOutMetrics GetSenderAggregatedOutMetrics (string cacheName)
 Gets sender hub outgoing data metrics aggregated across all remote data centers for the given cache name. More...
 
IDrSenderOutMetrics GetSenderAggregatedOutMetrics ()
 Gets sender hub outgoing data metrics aggregated across all remote data centers and cache names. More...
 
IDrReceiverInMetrics GetReceiverInMetrics (byte srcDataCenterId, string cacheName)
 Gets receiver hub incoming data metrics for the given remote data center and cache name. More...
 
IDrReceiverInMetrics GetReceiverAggregatedInMetrics (byte srcDataCenterId)
 Gets receiver hub incoming data metrics aggregated across all cache names for the given remote data center. More...
 
IDrReceiverInMetrics GetReceiverAggregatedInMetrics (string cacheName)
 Gets receiver hub incoming data metrics aggregated across all remote data centers for the given cache name. More...
 
IDrReceiverInMetrics GetReceiverAggregatedInMetrics ()
 Gets receiver hub incoming data metrics aggregated across all remote data centers and cache names. More...
 
IDrReceiverOutMetrics GetReceiverOutMetrics (string cacheName)
 Gets receiver hub outgoing data metrics for the given cache name. More...
 
IDrReceiverOutMetrics GetReceiverAggregatedOutMetrics ()
 Gets receiver hub outgoing data metrics aggregated across all receiver caches. More...
 
void ResetMetrics ()
 Reset all sender hub and receiver hub metrics on this node. In case this node is neither sender hub, nor receiver hub, the method is no-op. More...
 

Detailed Description

DR is a process of transferring updates from a cache located in one topology to a cache located in another topology. Usual use case for DR is synchronizing cache state between several geographically remote topologies through WAN.

DR operates on the following terms: Data center - particular GridGain topology with unique ID; Sender cache - cache from which data is being replicated; Receiver cache - cache which applies updates from remote data center; Sender hub - node which accumulates updates from sender data nodes and sends that to receiver hub in remote data center; receiver hub - node which receives updates from remote data center sender hub and applies them to receiver data nodes.

Cache is considered as sender in case it has DrSenderConfiguration, and it is considered as receiver cache in case DrReceiverEnabled is true.

Node is considered as sender hub in case it has DrSenderConfiguration, and it is considered as receiver hub in case it has DrReceiverConfiguration.

Particular cache can be both sender and receiver at the same time. Particular node can be both sender and receiver hub and host sender/receiver caches at the same time.

This API provides ability to manage DR process on sender cache node as well as get metrics for sender cache, receiver cache, sender hub and receiver hub.

Member Function Documentation

IDrReceiverInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverAggregatedInMetrics ( byte  srcDataCenterId)

In case node is not receiver hub then InvalidOperationException will be thrown.

Parameters
srcDataCenterIdRemote data center ID.
Returns
Receiver hub incoming data metrics.
IDrReceiverInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverAggregatedInMetrics ( string  cacheName)

In case node is not receiver hub then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
Receiver hub incoming data metrics.
IDrReceiverInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverAggregatedInMetrics ( )

In case node is not receiver hub then InvalidOperationException will be thrown.

Returns
Receiver hub incoming data metrics.
IDrReceiverOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverAggregatedOutMetrics ( )

In case node is not receiver hub then InvalidOperationException will be thrown.

Returns
Receiver hub outgoing data metrics.
ICacheDrReceiverMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverCacheMetrics ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not receiver cache then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
Receiver cache metrics.
IDrReceiverInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverInMetrics ( byte  srcDataCenterId,
string  cacheName 
)

In case node is not receiver hub then InvalidOperationException will be thrown.

Parameters
srcDataCenterIdRemote data center ID.
cacheNameCache name.
Returns
Receiver hub incoming data metrics.
IDrReceiverOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetReceiverOutMetrics ( string  cacheName)

In case node is not receiver hub then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
Receiver hub outgoing data metrics.
IDrSenderInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderAggregatedInMetrics ( )

In case node is not sender hub then InvalidOperationException will be thrown.

Returns
Sender hub incoming data metrics.
IDrSenderOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderAggregatedOutMetrics ( byte  destDataCenterId)

In case node is not sender hub then InvalidOperationException will be thrown. If this sender hub does not work with the given data center ArgumentException will be thrown.

Parameters
destDataCenterIdRemote data center ID.
Returns
Sender hub incoming data metrics.
IDrSenderOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderAggregatedOutMetrics ( string  cacheName)

In case node is not sender hub then InvalidOperationException will be thrown. If this sender hub does not work with the given cache ArgumentException will be thrown.

Parameters
cacheNameCache name.
Returns
Sender hub incoming data metrics.
IDrSenderOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderAggregatedOutMetrics ( )

In case node is not sender hub then InvalidOperationException will be thrown.

Returns
Sender hub outgoing data metrics.
ICacheDrSenderMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderCacheMetrics ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
Sender cache metrics.
ICacheDrStatus GridGain.DataCenterReplication.IDataCenterReplication.GetSenderCacheStatus ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache or grid is stopping then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
Data center replication status.
IDrSenderInMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderInMetrics ( string  cacheName)

In case node is not sender hub then InvalidOperationException will be thrown. If this sender hub does not work with the given cache ArgumentException will be thrown.

Parameters
cacheNameCache name.
Returns
Sender hub incoming data metrics.
IDrSenderOutMetrics GridGain.DataCenterReplication.IDataCenterReplication.GetSenderOutMetrics ( byte  destDataCenterId,
string  cacheName 
)

In case node is not sender hub then InvalidOperationException will be thrown. If this sender hub does not work with the given data center or cache ArgumentException will be thrown.

Parameters
destDataCenterIdRemote data center ID.
cacheNameCache name.
Returns
Sender hub incoming data metrics.
ICollection<ICacheDrStateTransfer> GridGain.DataCenterReplication.IDataCenterReplication.GetStateTransfers ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache or grid is stopping then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
Returns
All currently active state transfers.
void GridGain.DataCenterReplication.IDataCenterReplication.Pause ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache or grid is stopping then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
void GridGain.DataCenterReplication.IDataCenterReplication.ResetMetrics ( )
void GridGain.DataCenterReplication.IDataCenterReplication.Resume ( string  cacheName)

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache or grid is stopping then InvalidOperationException will be thrown.

Parameters
cacheNameCache name.
IFuture GridGain.DataCenterReplication.IDataCenterReplication.StartStateTransfer ( string  cacheName,
params byte[]  dataCenterIds 
)

In case node doesn't have cache with the given name or this cache is not sender cache, an exception will be thrown.

Only one state transfer for particular cache and data center is allowed at a time. In case another state transfer for the given cache and data center had been already in progress when this method was called, then no new state transfer for this (cache name, data center) pair will be initiated and returned future will "join" existing state transfer.

In case node doesn't have cache with the given name then ArgumentException will be thrown, and if this cache is not sender cache or grid is stopping then InvalidOperationException will be thrown.

Parameters
cacheNameSender cache name.
dataCenterIdsRemote data center IDs for which full state transfer was requested.
Returns
Future that will be completed when all required data is transferred from sender caches to sender hubs.