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:
GridCacheConfiguration.getDrSenderConfiguration(), and it is
considered as receiver cache in case it has GridCacheConfiguration.getDrReceiverConfiguration().
Node is considered as sender hub in case it has GridConfiguration.getDrSenderHubConfiguration(),
and it is considered as receiver hub in case it has
GridConfiguration.getDrReceiverHubConfiguration().
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 |
|---|---|
GridDrReceiverCacheMetrics |
receiverCacheMetrics(String cacheName)
Gets receiver cache metrics.
|
GridDrReceiverHubInMetrics |
receiverHubAggregatedInMetrics()
Gets receiver hub incoming data metrics aggregated across all remote data centers and cache names.
|
GridDrReceiverHubInMetrics |
receiverHubAggregatedInMetrics(byte srcDataCenterId)
Gets receiver hub incoming data metrics aggregated across all cache names for the given remote data center.
|
GridDrReceiverHubInMetrics |
receiverHubAggregatedInMetrics(String cacheName)
Gets receiver hub incoming data metrics aggregated across all remote data centers for the given cache name.
|
GridDrReceiverHubOutMetrics |
receiverHubAggregatedOutMetrics()
Gets receiver hub outgoing data metrics aggregated across all receiver caches.
|
GridDrReceiverHubInMetrics |
receiverHubInMetrics(byte srcDataCenterId,
String cacheName)
Gets receiver hub incoming data metrics for the given remote data center and cache name.
|
GridDrReceiverHubOutMetrics |
receiverHubOutMetrics(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.
|
Collection<GridDrStateTransferDescriptor> |
senderCacheDrListStateTransfers(String cacheName)
List all currently active state transfer for the given sender cache.
|
void |
senderCacheDrPause(String cacheName)
Pauses data center replication for particular sender cache.
|
void |
senderCacheDrResume(String cacheName)
Resumes data center replication for particular sender cache.
|
GridFuture<?> |
senderCacheDrStateTransfer(String cacheName,
byte... dataCenterId)
Starts full state transfer for the given sender cache.
|
GridDrStatus |
senderCacheDrStatus(String cacheName)
Gets data center replication status for particular sender cache.
|
GridDrSenderCacheMetrics |
senderCacheMetrics(String cacheName)
Gets sender cache metrics.
|
GridDrSenderHubInMetrics |
senderHubAggregatedInMetrics()
Gets sender hub incoming data metrics aggregated across all caches.
|
GridDrSenderHubOutMetrics |
senderHubAggregatedOutMetrics()
Gets sender hub outgoing data metrics aggregated across all remote data centers and cache names.
|
GridDrSenderHubOutMetrics |
senderHubAggregatedOutMetrics(byte destDataCenterId)
Gets sender hub outgoing data metrics aggregated across all cache names for the given remote data center ID.
|
GridDrSenderHubOutMetrics |
senderHubAggregatedOutMetrics(String cacheName)
Gets sender hub outgoing data metrics aggregated across all remote data centers for the given cache name.
|
GridDrSenderHubInMetrics |
senderHubInMetrics(String cacheName)
Gets sender hub incoming data metrics for specified sender cache.
|
GridDrSenderHubOutMetrics |
senderHubOutMetrics(byte destDataCenterId,
String cacheName)
Gets sender hub outgoing data metrics for the given remote data center ID and cache name.
|
GridFuture<?> senderCacheDrStateTransfer(String cacheName, byte... dataCenterId)
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.dataCenterId - Remote data center IDs for which full state transfer was requested.Collection<GridDrStateTransferDescriptor> senderCacheDrListStateTransfers(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 senderCacheDrPause(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 senderCacheDrResume(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.GridDrStatus senderCacheDrStatus(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.GridDrSenderCacheMetrics 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.GridDrReceiverCacheMetrics 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.GridDrSenderHubInMetrics senderHubInMetrics(@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.GridDrSenderHubInMetrics senderHubAggregatedInMetrics()
In case node is not sender hub then IllegalStateException will be thrown.
GridDrSenderHubOutMetrics senderHubOutMetrics(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.GridDrSenderHubOutMetrics senderHubAggregatedOutMetrics(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.GridDrSenderHubOutMetrics senderHubAggregatedOutMetrics(@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.GridDrSenderHubOutMetrics senderHubAggregatedOutMetrics()
In case node is not sender hub then IllegalStateException will be thrown.
GridDrReceiverHubInMetrics receiverHubInMetrics(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.GridDrReceiverHubInMetrics receiverHubAggregatedInMetrics(byte srcDataCenterId)
In case node is not receiver hub then IllegalStateException will be thrown.
srcDataCenterId - Remote data center ID.GridDrReceiverHubInMetrics receiverHubAggregatedInMetrics(@Nullable String cacheName)
In case node is not receiver hub then IllegalStateException will be thrown.
cacheName - Cache name.GridDrReceiverHubInMetrics receiverHubAggregatedInMetrics()
In case node is not receiver hub then IllegalStateException will be thrown.
GridDrReceiverHubOutMetrics receiverHubOutMetrics(@Nullable String cacheName)
In case node is not receiver hub then IllegalStateException will be thrown.
cacheName - Cache name.GridDrReceiverHubOutMetrics receiverHubAggregatedOutMetrics()
In case node is not receiver hub then IllegalStateException will be thrown.
void resetMetrics()
Sender and receiver cache metrics must be reset through GridCache.resetMetrics().
Copyright © 2014. All rights reserved.