Class MultimasterReplication
- java.lang.Object
-
- org.opends.server.api.SynchronizationProvider<ReplicationSynchronizationProviderCfg>
-
- org.opends.server.replication.plugin.MultimasterReplication
-
- All Implemented Interfaces:
ConfigurationAddListener<ReplicationDomainCfg>
,ConfigurationChangeListener<ReplicationSynchronizationProviderCfg>
,ConfigurationDeleteListener<ReplicationDomainCfg>
,BackupTaskListener
,ExportTaskListener
,ImportTaskListener
,RestoreTaskListener
,HealthStatusProvider
,ShutdownSynchronizer
public class MultimasterReplication extends SynchronizationProvider<ReplicationSynchronizationProviderCfg> implements ConfigurationAddListener<ReplicationDomainCfg>, ConfigurationDeleteListener<ReplicationDomainCfg>, ConfigurationChangeListener<ReplicationSynchronizationProviderCfg>, BackupTaskListener, RestoreTaskListener, ImportTaskListener, ExportTaskListener, HealthStatusProvider, ShutdownSynchronizer
This class is used to load the Replication code inside the JVM and to trigger initialization of the replication. It also extends the SynchronizationProvider class in order to have some replication code running during the operation process as pre-op, conflictResolution, and post-op.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultimasterReplication.CleanStaleHistoricalMetadataPlugin
If replication is configured and then unconfigured, we need to remove replication metadata from entries being updated to avoid OPENDJ-6235.static class
MultimasterReplication.UnreachableReplicationServers
Keeps information on temporarily unreachable replication unreachableServers.
-
Constructor Summary
Constructors Constructor Description MultimasterReplication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResult
applyConfigurationAdd(ReplicationDomainCfg configuration)
Adds a new configuration to this add listener.ConfigChangeResult
applyConfigurationChange(ReplicationSynchronizationProviderCfg configuration)
Applies the configuration changes to this change listener.ConfigChangeResult
applyConfigurationDelete(ReplicationDomainCfg configuration)
Deletes an existing configuration from this delete listener.void
clearReplicaOfflineMsgNotifications(Dn baseDn)
Clear the notifications for the provided domain.void
completeSynchronizationProvider()
Performs any necessary final initialization processing for this synchronization provider.LDAPReplicationDomain
createNewDomainIfEnabled(ServerContext serverContext, ReplicationDomainCfg configuration)
Creates a new domain from its configEntry, do the necessary initialization and starts it so that it is fully operational when this method returns.static void
deleteDomain(Dn dn)
Deletes a domain.void
doPostOperation(PostOperationAddOperation addOperation)
Performs any necessary synchronization processing that may be needed after the provided add operation is performed.void
doPostOperation(PostOperationDeleteOperation deleteOperation)
Performs any necessary synchronization processing that may be needed after the provided delete operation is performed.void
doPostOperation(PostOperationModifyDNOperation modifyDNOperation)
Performs any necessary synchronization processing that may be needed after the provided modify DN operation is performed.void
doPostOperation(PostOperationModifyOperation modifyOperation)
Performs any necessary synchronization processing that may be needed after the provided modify operation is performed.SynchronizationProviderResult
doPreOperation(PreOperationAddOperation addOperation)
Performs any necessary synchronization processing that may be needed before the provided add operation is performed.SynchronizationProviderResult
doPreOperation(PreOperationDeleteOperation deleteOperation)
Performs any necessary synchronization processing that may be needed before the provided delete operation is performed.SynchronizationProviderResult
doPreOperation(PreOperationModifyDNOperation modifyDnOp)
Performs any necessary synchronization processing that may be needed before the provided modify DN operation is performed.SynchronizationProviderResult
doPreOperation(PreOperationModifyOperation modifyOperation)
Performs any necessary synchronization processing that may be needed before the provided modify operation is performed.void
finalizeSynchronizationProvider()
Performs any necessary finalization for this synchronization provider.static LDAPReplicationDomain
findDomain(Dn dn, ServerContext serverContext)
Finds the domain for a given DN.static LDAPReplicationDomain
findDomain(Dn dn, PluginOperation pluginOp, ServerContext serverContext)
Finds the domain for a given DN.static int
getConnectionTimeoutMS()
Returns the connection timeout in milli-seconds.static Collection<Dn>
getDomainDns()
Returns the DNs of the replication domains.HealthStatus
getHealthStatus()
Returns theHealthStatus
for the underlying component.static MultimasterReplication.UnreachableReplicationServers
getUnreachableReplicationServers(int numberOfRSes)
Returns temporarily unreachable Replication Servers.SynchronizationProviderResult
handleConflictResolution(PreOperationAddOperation addOperation)
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data.SynchronizationProviderResult
handleConflictResolution(PreOperationDeleteOperation deleteOperation)
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data.SynchronizationProviderResult
handleConflictResolution(PreOperationModifyDNOperation modifyDNOperation)
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data.SynchronizationProviderResult
handleConflictResolution(PreOperationModifyOperation modifyOperation)
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data.void
initializeSynchronizationProvider(ServerContext serverContext, ReplicationSynchronizationProviderCfg cfg)
Performs any initialization that might be necessary for this synchronization provider.boolean
isConfigurationAddAcceptable(ReplicationDomainCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is acceptable to this add listener.boolean
isConfigurationChangeAcceptable(ReplicationSynchronizationProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.boolean
isConfigurationDeleteAcceptable(ReplicationDomainCfg configuration, List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.void
notifyReplicaOfflineMsgHasBeenForwardedToRS(Dn baseDn)
Notifies the offline message for the provided domain has been forwarded to a RS.void
notifyReplicaOfflineMsgHasBeenSentByDS(Dn baseDn)
Notifies an offline message has been sent by the DS for the provided domain.void
processBackupBegin(LocalBackend<?> backend)
Performs any processing that might be necessary just before the server begins processing on a backup task.void
processBackupEnd(LocalBackend<?> backend)
Performs any processing that might be necessary after the server has completed processing on a backup task.void
processExportBegin(LocalBackend<?> backend, LDIFExportConfig config)
Performs any processing that might be necessary just before the server begins processing on an LDIF export task.void
processExportEnd(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
Performs any processing that might be necessary after the server has completed processing on an LDIF export task.void
processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
Performs any processing that might be necessary just before the server begins processing on an LDIF import task.void
processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
Performs any processing that might be necessary after the server has completed processing on an LDIF import task.void
processRestoreBegin(LocalBackend<?> backend)
Performs any processing that might be necessary just before the server begins processing on a restore task.void
processRestoreEnd(LocalBackend<?> backend)
Performs any processing that might be necessary after the server has completed processing on a restore task.static void
resetUnreachableReplicationServers()
Resets the state of the unreachable replication servers to empty.void
synchronizeOfflineChanges(Collection<ChangeRecord> changes)
Synchronizes changes that have occurred to server data while the server was offline.void
waitForReplicaOfflineMessageToBeForwardedToRS(Dn baseDn)
Waits until a Replication Server can proceed with shutdown.-
Methods inherited from class org.opends.server.api.SynchronizationProvider
isConfigurationAcceptable
-
-
-
-
Method Detail
-
findDomain
public static LDAPReplicationDomain findDomain(Dn dn, PluginOperation pluginOp, ServerContext serverContext)
Finds the domain for a given DN.- Parameters:
dn
- The DN for which the domain must be returned.pluginOp
- An optional operation for which the check is done. Can be null is the request has no associated operation.serverContext
- The server context.- Returns:
- The domain for this DN.
-
findDomain
public static LDAPReplicationDomain findDomain(Dn dn, ServerContext serverContext)
Finds the domain for a given DN.- Parameters:
dn
- The DN for which the domain must be returned.serverContext
- The server context.- Returns:
- The domain for this DN.
-
createNewDomainIfEnabled
public LDAPReplicationDomain createNewDomainIfEnabled(ServerContext serverContext, ReplicationDomainCfg configuration)
Creates a new domain from its configEntry, do the necessary initialization and starts it so that it is fully operational when this method returns.- Parameters:
serverContext
- The server contextconfiguration
- The entry with the configuration of this domain.- Returns:
- The domain created or
null
if it is disabled or a problem occurred.
-
deleteDomain
public static void deleteDomain(Dn dn)
Deletes a domain.- Parameters:
dn
- the base DN of the domain to delete.
-
initializeSynchronizationProvider
public void initializeSynchronizationProvider(ServerContext serverContext, ReplicationSynchronizationProviderCfg cfg) throws ConfigException
Description copied from class:SynchronizationProvider
Performs any initialization that might be necessary for this synchronization provider.- Specified by:
initializeSynchronizationProvider
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
serverContext
- The server context.cfg
- The configuration information for this synchronization provider.- Throws:
ConfigException
- If the provided entry does not contain a valid configuration for this synchronization provider.
-
isConfigurationAddAcceptable
public boolean isConfigurationAddAcceptable(ReplicationDomainCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationAddListener
Indicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptable
in interfaceConfigurationAddListener<ReplicationDomainCfg>
- Parameters:
configuration
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed addition is acceptable, orfalse
if it is not.
-
applyConfigurationAdd
public ConfigChangeResult applyConfigurationAdd(ReplicationDomainCfg configuration)
Description copied from interface:ConfigurationAddListener
Adds a new configuration to this add listener.- Specified by:
applyConfigurationAdd
in interfaceConfigurationAddListener<ReplicationDomainCfg>
- Parameters:
configuration
- The configuration that will be added.- Returns:
- Returns information about the result of adding the configuration.
-
doPostOperation
public void doPostOperation(PostOperationAddOperation addOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed after the provided add operation is performed. This method will be invoked immediately after processing the add operation in the backend and releasing the lock on the target entry.- Specified by:
doPostOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
addOperation
- The add operation to be processed.
-
doPostOperation
public void doPostOperation(PostOperationDeleteOperation deleteOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed after the provided delete operation is performed. This method will be invoked immediately after processing the delete operation in the backend and releasing the lock on the target entry.- Specified by:
doPostOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
deleteOperation
- The delete operation to be processed.
-
doPostOperation
public void doPostOperation(PostOperationModifyDNOperation modifyDNOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed after the provided modify DN operation is performed. This method will be invoked immediately after processing the modify DN operation in the backend and releasing the lock on the target entry.- Specified by:
doPostOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyDNOperation
- The modify DN operation to be processed.
-
doPostOperation
public void doPostOperation(PostOperationModifyOperation modifyOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed after the provided modify operation is performed. This method will be invoked immediately after processing the modify operation in the backend and releasing the lock on the target entry.- Specified by:
doPostOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyOperation
- The modify operation to be processed.
-
handleConflictResolution
public SynchronizationProviderResult handleConflictResolution(PreOperationModifyOperation modifyOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data. This method will be invoked immediately after a lock is acquired on the target entry.- Overrides:
handleConflictResolution
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyOperation
- The modify operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
handleConflictResolution
public SynchronizationProviderResult handleConflictResolution(PreOperationAddOperation addOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data. This method will be invoked immediately after a lock is acquired on the target entry.- Overrides:
handleConflictResolution
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
addOperation
- The add operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
handleConflictResolution
public SynchronizationProviderResult handleConflictResolution(PreOperationDeleteOperation deleteOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data. This method will be invoked immediately after a lock is acquired on the target entry.- Overrides:
handleConflictResolution
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
deleteOperation
- The delete operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
handleConflictResolution
public SynchronizationProviderResult handleConflictResolution(PreOperationModifyDNOperation modifyDNOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing for the operation that may be needed early on to deal with any potential conflict resolution or updates to historical data. This method will be invoked immediately after a lock is acquired on the target entry.- Overrides:
handleConflictResolution
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyDNOperation
- The modify DN operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
doPreOperation
public SynchronizationProviderResult doPreOperation(PreOperationModifyOperation modifyOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed before the provided modify operation is performed. This method will be invoked immediately before processing the modify operation in the backend.- Specified by:
doPreOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyOperation
- The modify operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
doPreOperation
public SynchronizationProviderResult doPreOperation(PreOperationDeleteOperation deleteOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed before the provided delete operation is performed. This method will be invoked immediately before processing the delete operation in the backend.- Specified by:
doPreOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
deleteOperation
- The delete operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
doPreOperation
public SynchronizationProviderResult doPreOperation(PreOperationModifyDNOperation modifyDnOp)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed before the provided modify DN operation is performed. This method will be invoked immediately before processing the modify DN operation in the backend.- Specified by:
doPreOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
modifyDnOp
- The modify DN operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
doPreOperation
public SynchronizationProviderResult doPreOperation(PreOperationAddOperation addOperation)
Description copied from class:SynchronizationProvider
Performs any necessary synchronization processing that may be needed before the provided add operation is performed. This method will be invoked immediately before processing the add operation in the backend.- Specified by:
doPreOperation
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
addOperation
- The add operation to be processed.- Returns:
- Information about the result of the synchronization provider processing. Note that if the provider indicates that processing should end for the operation, it must set the result code for the operation and should also set the response message.
-
finalizeSynchronizationProvider
public void finalizeSynchronizationProvider()
Description copied from class:SynchronizationProvider
Performs any necessary finalization for this synchronization provider. This will be called just after the provider has been unregistered with the server but before it has been unloaded.- Overrides:
finalizeSynchronizationProvider
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
-
synchronizeOfflineChanges
public void synchronizeOfflineChanges(Collection<ChangeRecord> changes)
Description copied from class:SynchronizationProvider
Synchronizes changes that have occurred to server data while the server was offline. This may happen when the server detects that the schema has been updated while the server was offline or if new symmetric keys have been added, e.g when performing an offline encrypted backup or import.At the time this method is called, the changes will have already been applied to the local server. As such, this method must make a best effort attempt to process the associated changes, and is not allowed to throw any exceptions.
- Specified by:
synchronizeOfflineChanges
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
- Parameters:
changes
- The set of changes that have been made to the server while it was offline.
-
processBackupBegin
public void processBackupBegin(LocalBackend<?> backend)
Description copied from interface:BackupTaskListener
Performs any processing that might be necessary just before the server begins processing on a backup task. This may include flushing any outstanding writes to disk so they are included in the backup and/or pausing interaction with the provided backend while the backup is in progress.- Specified by:
processBackupBegin
in interfaceBackupTaskListener
- Parameters:
backend
- The backend to be archived.
-
processBackupEnd
public void processBackupEnd(LocalBackend<?> backend)
Description copied from interface:BackupTaskListener
Performs any processing that might be necessary after the server has completed processing on a backup task. Note that this will always be called when backup processing completes, regardless of whether it was successful.- Specified by:
processBackupEnd
in interfaceBackupTaskListener
- Parameters:
backend
- The backend that was archived.
-
processRestoreBegin
public void processRestoreBegin(LocalBackend<?> backend)
Description copied from interface:RestoreTaskListener
Performs any processing that might be necessary just before the server begins processing on a restore task. This should include pausing interaction with the provided backend while the restore is in progress.- Specified by:
processRestoreBegin
in interfaceRestoreTaskListener
- Parameters:
backend
- The backend to be restored.
-
processRestoreEnd
public void processRestoreEnd(LocalBackend<?> backend)
Description copied from interface:RestoreTaskListener
Performs any processing that might be necessary after the server has completed processing on a restore task. Note that this will always be called when restore processing completes, regardless of whether it was successful.- Specified by:
processRestoreEnd
in interfaceRestoreTaskListener
- Parameters:
backend
- The backend that was restored.
-
processImportBegin
public void processImportBegin(LocalBackend<?> backend, LDIFImportConfig config)
Description copied from interface:ImportTaskListener
Performs any processing that might be necessary just before the server begins processing on an LDIF import task. This should include pausing interaction with the provided backend while the import is in progress.- Specified by:
processImportBegin
in interfaceImportTaskListener
- Parameters:
backend
- The backend to be imported.config
- Configuration information about the LDIF import to be performed.
-
processImportEnd
public void processImportEnd(LocalBackend<?> backend, LDIFImportConfig config, boolean successful)
Description copied from interface:ImportTaskListener
Performs any processing that might be necessary after the server has completed processing on an LDIF import task. Note that this will always be called when import processing completes, regardless of whether it was successful.- Specified by:
processImportEnd
in interfaceImportTaskListener
- Parameters:
backend
- The backend that was imported.config
- Configuration information about the LDIF import that was performed.successful
- Indicates whether the import operation completed successfully.
-
processExportBegin
public void processExportBegin(LocalBackend<?> backend, LDIFExportConfig config)
Description copied from interface:ExportTaskListener
Performs any processing that might be necessary just before the server begins processing on an LDIF export task. This may include flushing any outstanding writes to disk so they are included in the export and/or pausing interaction with the provided backend while the export is in progress.- Specified by:
processExportBegin
in interfaceExportTaskListener
- Parameters:
backend
- The backend to be exported.config
- Configuration information about the LDIF export to be performed.
-
processExportEnd
public void processExportEnd(LocalBackend<?> backend, LDIFExportConfig config, boolean successful)
Description copied from interface:ExportTaskListener
Performs any processing that might be necessary after the server has completed processing on an LDIF export task. Note that this will always be called when export processing completes, regardless of whether it was successful.- Specified by:
processExportEnd
in interfaceExportTaskListener
- Parameters:
backend
- The backend that was exported.config
- Configuration information about the LDIF export that was performed.successful
- Indicates whether the export operation completed successfully.
-
applyConfigurationDelete
public ConfigChangeResult applyConfigurationDelete(ReplicationDomainCfg configuration)
Description copied from interface:ConfigurationDeleteListener
Deletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDelete
in interfaceConfigurationDeleteListener<ReplicationDomainCfg>
- Parameters:
configuration
- The existing configuration that will be deleted.- Returns:
- Returns information about the result of deleting the configuration.
-
isConfigurationDeleteAcceptable
public boolean isConfigurationDeleteAcceptable(ReplicationDomainCfg configuration, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationDeleteListener
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptable
in interfaceConfigurationDeleteListener<ReplicationDomainCfg>
- Parameters:
configuration
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed deletion is acceptable, orfalse
if it is not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(ReplicationSynchronizationProviderCfg cfg, List<LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<ReplicationSynchronizationProviderCfg>
- Parameters:
cfg
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(ReplicationSynchronizationProviderCfg configuration)
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<ReplicationSynchronizationProviderCfg>
- Parameters:
configuration
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
completeSynchronizationProvider
public void completeSynchronizationProvider()
Description copied from class:SynchronizationProvider
Performs any necessary final initialization processing for this synchronization provider. This will be called just after the provider has been registered with the server but before it has been unloaded.- Overrides:
completeSynchronizationProvider
in classSynchronizationProvider<ReplicationSynchronizationProviderCfg>
-
getHealthStatus
public HealthStatus getHealthStatus()
Description copied from interface:HealthStatusProvider
Returns theHealthStatus
for the underlying component.- Specified by:
getHealthStatus
in interfaceHealthStatusProvider
- Returns:
- The
HealthStatus
.
-
getDomainDns
public static Collection<Dn> getDomainDns()
Returns the DNs of the replication domains.- Returns:
- the DNs of the replication domains.
-
getConnectionTimeoutMS
public static int getConnectionTimeoutMS()
Returns the connection timeout in milli-seconds.- Returns:
- The connection timeout in milli-seconds.
-
getUnreachableReplicationServers
public static MultimasterReplication.UnreachableReplicationServers getUnreachableReplicationServers(int numberOfRSes)
Returns temporarily unreachable Replication Servers.- Parameters:
numberOfRSes
- the number of replication servers currently active- Returns:
- temporarily unreachable Replication Servers
-
resetUnreachableReplicationServers
public static void resetUnreachableReplicationServers()
Resets the state of the unreachable replication servers to empty.
-
notifyReplicaOfflineMsgHasBeenSentByDS
public void notifyReplicaOfflineMsgHasBeenSentByDS(Dn baseDn)
Description copied from interface:ShutdownSynchronizer
Notifies an offline message has been sent by the DS for the provided domain.- Specified by:
notifyReplicaOfflineMsgHasBeenSentByDS
in interfaceShutdownSynchronizer
- Parameters:
baseDn
- the domain for which the offline message has been sent.
-
notifyReplicaOfflineMsgHasBeenForwardedToRS
public void notifyReplicaOfflineMsgHasBeenForwardedToRS(Dn baseDn)
Description copied from interface:ShutdownSynchronizer
Notifies the offline message for the provided domain has been forwarded to a RS.- Specified by:
notifyReplicaOfflineMsgHasBeenForwardedToRS
in interfaceShutdownSynchronizer
- Parameters:
baseDn
- the domain for which the offline message has been forwarded.
-
waitForReplicaOfflineMessageToBeForwardedToRS
public void waitForReplicaOfflineMessageToBeForwardedToRS(Dn baseDn)
Description copied from interface:ShutdownSynchronizer
Waits until a Replication Server can proceed with shutdown.The shutdown can be performed only when the offline message have been forwarded to all remote replications servers, or if the timeout has been reached.
- Specified by:
waitForReplicaOfflineMessageToBeForwardedToRS
in interfaceShutdownSynchronizer
- Parameters:
baseDn
- the domain for which the offline message should be forwarded.
-
clearReplicaOfflineMsgNotifications
public void clearReplicaOfflineMsgNotifications(Dn baseDn)
Description copied from interface:ShutdownSynchronizer
Clear the notifications for the provided domain. In other words, reset the counter of offline messages to forward to remote replication servers to zero.If the synchronization has failed or must be aborted for any reason, this method allows to reset the synchronizer to a clean state. For example, if a ReplicaOfflineMsg is ignored due to a DS in a bad data status, the shutdown for the peer DS should not wait for the forwarding of the message to other replication servers.
- Specified by:
clearReplicaOfflineMsgNotifications
in interfaceShutdownSynchronizer
- Parameters:
baseDn
- the domain for which the notifications must be cleared
-
-