public class ReplicationServerListener extends Object implements ConfigurationAddListener<ReplicationServerCfg>, ConfigurationDeleteListener<ReplicationServerCfg>
Constructor and Description |
---|
ReplicationServerListener(ReplicationSynchronizationProviderCfg configuration,
DSRSShutdownSync dsrsShutdownSync)
Build a ReplicationServer Listener from the given Multimaster
configuration.
|
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationAdd(ReplicationServerCfg cfg)
Adds a new configuration to this add listener.
|
ConfigChangeResult |
applyConfigurationDelete(ReplicationServerCfg cfg)
Deletes an existing configuration from this delete listener.
|
ReplicationServer |
getReplicationServer()
Returns the associated Replication Server.
|
boolean |
isConfigurationAddAcceptable(ReplicationServerCfg cfg,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed addition of a new configuration is
acceptable to this add listener.
|
boolean |
isConfigurationDeleteAcceptable(ReplicationServerCfg cfg,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed deletion of an existing
configuration is acceptable to this delete listener.
|
void |
shutdown()
Shutdown the replication server.
|
public ReplicationServerListener(ReplicationSynchronizationProviderCfg configuration, DSRSShutdownSync dsrsShutdownSync) throws ConfigException
configuration
- The configuration that will be used to listen
for replicationServer configuration changes.dsrsShutdownSync
- Synchronization object for shutdown of combined DS/RS instances.ConfigException
- if the ReplicationServerListener can't register for
listening to changes on the provided configuration
object.public ConfigChangeResult applyConfigurationAdd(ReplicationServerCfg cfg)
applyConfigurationAdd
in interface ConfigurationAddListener<ReplicationServerCfg>
cfg
- The configuration that will be added.public boolean isConfigurationAddAcceptable(ReplicationServerCfg cfg, List<LocalizableMessage> unacceptableReasons)
isConfigurationAddAcceptable
in interface ConfigurationAddListener<ReplicationServerCfg>
cfg
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed addition is
acceptable, or false
if it is not.public void shutdown()
public ConfigChangeResult applyConfigurationDelete(ReplicationServerCfg cfg)
applyConfigurationDelete
in interface ConfigurationDeleteListener<ReplicationServerCfg>
cfg
- The existing configuration that will be deleted.public boolean isConfigurationDeleteAcceptable(ReplicationServerCfg cfg, List<LocalizableMessage> unacceptableReasons)
isConfigurationDeleteAcceptable
in interface ConfigurationDeleteListener<ReplicationServerCfg>
cfg
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed deletion is
acceptable, or false
if it is not.public ReplicationServer getReplicationServer()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.