Search Results for

    Show / Hide Table of Contents

    Interface IDataCenterReplication

    Data Center Replication (DR) interface.

    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.

    Namespace: GridGain.Core.DataCenterReplication
    Assembly: GridGain.Core.dll
    Syntax
    public interface IDataCenterReplication

    Methods

    GetReceiverAggregatedInMetrics()

    Gets receiver hub incoming data metrics aggregated across all remote data centers and cache names.

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

    Declaration
    IDrReceiverInMetrics GetReceiverAggregatedInMetrics()
    Returns
    Type Description
    IDrReceiverInMetrics

    Receiver hub incoming data metrics.

    GetReceiverAggregatedInMetrics(Byte)

    Gets receiver hub incoming data metrics aggregated across all cache names for the given remote data center.

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

    Declaration
    IDrReceiverInMetrics GetReceiverAggregatedInMetrics(byte srcDataCenterId)
    Parameters
    Type Name Description
    System.Byte srcDataCenterId

    Remote data center ID.

    Returns
    Type Description
    IDrReceiverInMetrics

    Receiver hub incoming data metrics.

    GetReceiverAggregatedInMetrics(String)

    Gets receiver hub incoming data metrics aggregated across all remote data centers for the given cache name.

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

    Declaration
    IDrReceiverInMetrics GetReceiverAggregatedInMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrReceiverInMetrics

    Receiver hub incoming data metrics.

    GetReceiverAggregatedOutMetrics()

    Gets receiver hub outgoing data metrics aggregated across all receiver caches.

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

    Declaration
    IDrReceiverOutMetrics GetReceiverAggregatedOutMetrics()
    Returns
    Type Description
    IDrReceiverOutMetrics

    Receiver hub outgoing data metrics.

    GetReceiverCacheMetrics(String)

    Gets receiver cache metrics.

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

    Declaration
    ICacheDrReceiverMetrics GetReceiverCacheMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    ICacheDrReceiverMetrics

    Receiver cache metrics.

    GetReceiverInMetrics(Byte, String)

    Gets receiver hub incoming data metrics for the given remote data center and cache name.

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

    Declaration
    IDrReceiverInMetrics GetReceiverInMetrics(byte srcDataCenterId, string cacheName)
    Parameters
    Type Name Description
    System.Byte srcDataCenterId

    Remote data center ID.

    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrReceiverInMetrics

    Receiver hub incoming data metrics.

    GetReceiverOutMetrics(String)

    Gets receiver hub outgoing data metrics for the given cache name.

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

    Declaration
    IDrReceiverOutMetrics GetReceiverOutMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrReceiverOutMetrics

    Receiver hub outgoing data metrics.

    GetSenderAggregatedInMetrics()

    Gets sender hub incoming data metrics aggregated across all caches.

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

    Declaration
    IDrSenderInMetrics GetSenderAggregatedInMetrics()
    Returns
    Type Description
    IDrSenderInMetrics

    Sender hub incoming data metrics.

    GetSenderAggregatedOutMetrics()

    Gets sender hub outgoing data metrics aggregated across all remote data centers and cache names.

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

    Declaration
    IDrSenderOutMetrics GetSenderAggregatedOutMetrics()
    Returns
    Type Description
    IDrSenderOutMetrics

    Sender hub outgoing data metrics.

    GetSenderAggregatedOutMetrics(Byte)

    Gets sender hub outgoing data metrics aggregated across all cache names for the given remote data center ID.

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

    Declaration
    IDrSenderOutMetrics GetSenderAggregatedOutMetrics(byte destDataCenterId)
    Parameters
    Type Name Description
    System.Byte destDataCenterId

    Remote data center ID.

    Returns
    Type Description
    IDrSenderOutMetrics

    Sender hub incoming data metrics.

    GetSenderAggregatedOutMetrics(String)

    Gets sender hub outgoing data metrics aggregated across all remote data centers for the given cache name.

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

    Declaration
    IDrSenderOutMetrics GetSenderAggregatedOutMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrSenderOutMetrics

    Sender hub incoming data metrics.

    GetSenderCacheMetrics(String)

    Gets sender cache metrics.

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

    Declaration
    ICacheDrSenderMetrics GetSenderCacheMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    ICacheDrSenderMetrics

    Sender cache metrics.

    GetSenderCacheStatus(String)

    Gets data center replication status for particular sender cache.

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

    Declaration
    ICacheDrStatus GetSenderCacheStatus(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    ICacheDrStatus

    Data center replication status.

    GetSenderInMetrics(String)

    Gets sender hub incoming data metrics for specified sender cache.

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

    Declaration
    IDrSenderInMetrics GetSenderInMetrics(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrSenderInMetrics

    Sender hub incoming data metrics.

    GetSenderOutMetrics(Byte, String)

    Gets sender hub outgoing data metrics for the given remote data center ID and cache name.

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

    Declaration
    IDrSenderOutMetrics GetSenderOutMetrics(byte destDataCenterId, string cacheName)
    Parameters
    Type Name Description
    System.Byte destDataCenterId

    Remote data center ID.

    System.String cacheName

    Cache name.

    Returns
    Type Description
    IDrSenderOutMetrics

    Sender hub incoming data metrics.

    GetStateTransfers(String)

    List all currently active state transfer for the given sender cache.

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

    Declaration
    ICollection<ICacheDrStateTransfer> GetStateTransfers(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    Returns
    Type Description
    ICollection<ICacheDrStateTransfer>

    All currently active state transfers.

    Pause(String)

    Pauses data center replication for particular sender cache.

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

    Declaration
    void Pause(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    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.

    Declaration
    void ResetMetrics()

    Resume(String)

    Resumes data center replication for particular sender cache.

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

    Declaration
    void Resume(string cacheName)
    Parameters
    Type Name Description
    System.String cacheName

    Cache name.

    StartStateTransferAsync(String, Byte[])

    Starts full state transfer for the given sender cache.

    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 task will "join" existing state transfer.

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

    Declaration
    Task StartStateTransferAsync(string cacheName, params byte[] dataCenterIds)
    Parameters
    Type Name Description
    System.String cacheName

    Sender cache name.

    System.Byte[] dataCenterIds

    Remote data center IDs for which full state transfer was requested.

    Returns
    Type Description
    Task

    Task that will be completed when all required data is transferred from sender caches to sender hubs.

    In This Article
    Back to top © 2022 GridGain Systems, Inc. and Contributors