| | |
| | | import org.opends.server.replication.server.changelog.api.ChangelogDB; |
| | | import org.opends.server.replication.server.changelog.api.ChangelogException; |
| | | import org.opends.server.replication.server.changelog.je.JEChangelogDB; |
| | | import org.opends.server.replication.service.DSRSShutdownSync; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.workflowelement.externalchangelog.ECLWorkflowElement; |
| | |
| | | |
| | | /** The current configuration of this replication server. */ |
| | | private ReplicationServerCfg config; |
| | | private final DSRSShutdownSync dsrsShutdownSync; |
| | | |
| | | /** |
| | | * This table is used to store the list of dn for which we are currently |
| | |
| | | /** |
| | | * Creates a new Replication server using the provided configuration entry. |
| | | * |
| | | * @param configuration The configuration of this replication server. |
| | | * @param cfg The configuration of this replication server. |
| | | * @throws ConfigException When Configuration is invalid. |
| | | */ |
| | | public ReplicationServer(ReplicationServerCfg configuration) |
| | | throws ConfigException |
| | | public ReplicationServer(ReplicationServerCfg cfg) throws ConfigException |
| | | { |
| | | this.config = configuration; |
| | | this.changelogDB = new JEChangelogDB(this, configuration); |
| | | this(cfg, new DSRSShutdownSync()); |
| | | } |
| | | |
| | | /** |
| | | * Creates a new Replication server using the provided configuration entry. |
| | | * |
| | | * @param cfg The configuration of this replication server. |
| | | * @param dsrsShutdownSync Synchronization object for shutdown of combined DS/RS instances. |
| | | * @throws ConfigException When Configuration is invalid. |
| | | */ |
| | | public ReplicationServer(ReplicationServerCfg cfg, |
| | | DSRSShutdownSync dsrsShutdownSync) throws ConfigException |
| | | { |
| | | this.config = cfg; |
| | | this.changelogDB = new JEChangelogDB(this, cfg); |
| | | this.dsrsShutdownSync = dsrsShutdownSync; |
| | | |
| | | replSessionSecurity = new ReplSessionSecurity(); |
| | | initialize(); |
| | | configuration.addChangeListener(this); |
| | | cfg.addChangeListener(this); |
| | | |
| | | localPorts.add(getReplicationPort()); |
| | | |
| | |
| | | return this.changelogDB; |
| | | } |
| | | |
| | | /** |
| | | * Returns the synchronization object for shutdown of combined DS/RS instances. |
| | | * |
| | | * @return the synchronization object for shutdown of combined DS/RS instances. |
| | | */ |
| | | DSRSShutdownSync getDSRSShutdownSync() |
| | | { |
| | | return dsrsShutdownSync; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public String toString() |