public interface GridDr
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:
GridGainCacheConfiguration.getDrSenderConfiguration(), and it is
considered as receiver cache in case GridGainCacheConfiguration.isDrReceiverEnabled() is true.
Node is considered as sender hub in case it has GridGainConfiguration.getDrSenderConfiguration(),
and it is considered as receiver hub in case it has
GridGainConfiguration.getDrReceiverConfiguration().
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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLocalSender()
Checks whether current node is sender.
|
Collection<CacheDrStateTransfer> |
listStateTransfers(String cacheName)
List all currently active state transfer for the given sender cache.
|
DrSender |
localSender()
Gets sender facade for current node.
|
void |
pause(String cacheName)
Pauses data center replication for particular sender cache.
|
DrReceiverInMetrics |
receiverAggregatedInMetrics()
Gets receiver hub incoming data metrics aggregated across all remote data centers and cache names.
|
DrReceiverInMetrics |
receiverAggregatedInMetrics(byte srcDataCenterId)
Gets receiver hub incoming data metrics aggregated across all cache names for the given remote data center.
|
DrReceiverInMetrics |
receiverAggregatedInMetrics(String cacheName)
Gets receiver hub incoming data metrics aggregated across all remote data centers for the given cache name.
|
DrReceiverOutMetrics |
receiverAggregatedOutMetrics()
Gets receiver hub outgoing data metrics aggregated across all receiver caches.
|
CacheDrReceiverMetrics |
receiverCacheMetrics(String cacheName)
Gets receiver cache metrics.
|
DrReceiverInMetrics |
receiverInMetrics(byte srcDataCenterId,
String cacheName)
Gets receiver hub incoming data metrics for the given remote data center and cache name.
|
DrReceiverOutMetrics |
receiverOutMetrics(String cacheName)
Gets receiver hub outgoing data metrics for the given cache name.
|
void |
resetMetrics()
Reset all sender hub and receiver hub metrics on this node.
|
void |
resume(String cacheName)
Resumes data center replication for particular sender cache.
|
DrSenderInMetrics |
senderAggregatedInMetrics()
Gets sender hub incoming data metrics aggregated across all caches.
|
DrSenderOutMetrics |
senderAggregatedOutMetrics()
Gets sender hub outgoing data metrics aggregated across all remote data centers and cache names.
|
DrSenderOutMetrics |
senderAggregatedOutMetrics(byte destDataCenterId)
Gets sender hub outgoing data metrics aggregated across all cache names for the given remote data center ID.
|
DrSenderOutMetrics |
senderAggregatedOutMetrics(String cacheName)
Gets sender hub outgoing data metrics aggregated across all remote data centers for the given cache name.
|
CacheDrSenderMetrics |
senderCacheMetrics(String cacheName)
Gets sender cache metrics.
|
CacheDrStatus |
senderCacheStatus(String cacheName)
Gets data center replication status for particular sender cache.
|
DrSenderInMetrics |
senderInMetrics(String cacheName)
Gets sender hub incoming data metrics for specified sender cache.
|
DrSenderOutMetrics |
senderOutMetrics(byte destDataCenterId,
String cacheName)
Gets sender hub outgoing data metrics for the given remote data center ID and cache name.
|
org.apache.ignite.internal.IgniteInternalFuture<?> |
stateTransfer(String cacheName,
byte... dataCenterIds)
Starts full state transfer for the given sender cache.
|
org.apache.ignite.internal.IgniteInternalFuture<?> stateTransfer(String cacheName, 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 IllegalArgumentException
will be thrown, and if this cache is not sender cache or grid is stopping then IllegalStateException
will be thrown.
cacheName - Sender cache name.dataCenterIds - Remote data center IDs for which full state transfer was requested.Collection<CacheDrStateTransfer> listStateTransfers(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not sender cache or grid is stopping then IllegalStateException
will be thrown.
cacheName - Cache name.void pause(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not sender cache or grid is stopping then IllegalStateException
will be thrown.
cacheName - Sender cache name.void resume(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not sender cache or grid is stopping then IllegalStateException
will be thrown.
cacheName - Sender cache name.CacheDrStatus senderCacheStatus(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not sender cache or grid is stopping then IllegalStateException
will be thrown.
cacheName - Cache name.CacheDrSenderMetrics senderCacheMetrics(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not sender cache then IllegalStateException will be thrown.
cacheName - Sender cache name.CacheDrReceiverMetrics receiverCacheMetrics(String cacheName)
In case node doesn't have cache with the given name then IllegalArgumentException
will be thrown, and if this cache is not receiver cache IllegalStateException will be thrown.
cacheName - Receiver cache name.DrSenderInMetrics senderInMetrics(@Nullable String cacheName)
In case node is not sender hub then IllegalStateException will be thrown.
If this sender hub does not work with the given cache IllegalArgumentException will be thrown.
cacheName - Sender cache name.DrSenderInMetrics senderAggregatedInMetrics()
In case node is not sender hub then IllegalStateException will be thrown.
DrSenderOutMetrics senderOutMetrics(byte destDataCenterId, @Nullable String cacheName)
In case node is not sender hub then IllegalStateException will be thrown. If this sender hub does not
work with the given data center or cache IllegalArgumentException will be thrown.
destDataCenterId - Remote data center ID.cacheName - Cache name.DrSenderOutMetrics senderAggregatedOutMetrics(byte destDataCenterId)
In case node is not sender hub then IllegalStateException will be thrown. If this sender hub does not
work with the given data center IllegalArgumentException will be thrown.
destDataCenterId - Remote data center ID.DrSenderOutMetrics senderAggregatedOutMetrics(@Nullable String cacheName)
In case node is not sender hub then IllegalStateException will be thrown. If this sender hub does not
work with the given cache IllegalArgumentException will be thrown.
cacheName - Cache name.DrSenderOutMetrics senderAggregatedOutMetrics()
In case node is not sender hub then IllegalStateException will be thrown.
DrReceiverInMetrics receiverInMetrics(byte srcDataCenterId, @Nullable String cacheName)
In case node is not receiver hub then IllegalStateException will be thrown.
srcDataCenterId - Remote data center ID.cacheName - Cache name.DrReceiverInMetrics receiverAggregatedInMetrics(byte srcDataCenterId)
In case node is not receiver hub then IllegalStateException will be thrown.
srcDataCenterId - Remote data center ID.DrReceiverInMetrics receiverAggregatedInMetrics(@Nullable String cacheName)
In case node is not receiver hub then IllegalStateException will be thrown.
cacheName - Cache name.DrReceiverInMetrics receiverAggregatedInMetrics()
In case node is not receiver hub then IllegalStateException will be thrown.
DrReceiverOutMetrics receiverOutMetrics(@Nullable String cacheName)
In case node is not receiver hub then IllegalStateException will be thrown.
cacheName - Cache name.DrReceiverOutMetrics receiverAggregatedOutMetrics()
In case node is not receiver hub then IllegalStateException will be thrown.
void resetMetrics()
boolean isLocalSender()
True if sender.DrSender localSender() throws IllegalStateException
IllegalStateException - If current node is not sender.
GridGain Fabric : ver. 7.8.12 Release Date : October 2 2017