001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.meta;
027
028
029
030import java.net.InetAddress;
031import java.util.Collection;
032import java.util.SortedSet;
033import org.forgerock.opendj.config.server.ConfigException;
034import org.opends.server.admin.AdministratorAction;
035import org.opends.server.admin.AliasDefaultBehaviorProvider;
036import org.opends.server.admin.BooleanPropertyDefinition;
037import org.opends.server.admin.client.AuthorizationException;
038import org.opends.server.admin.client.CommunicationException;
039import org.opends.server.admin.client.ConcurrentModificationException;
040import org.opends.server.admin.client.ManagedObject;
041import org.opends.server.admin.client.ManagedObjectDecodingException;
042import org.opends.server.admin.client.MissingMandatoryPropertiesException;
043import org.opends.server.admin.client.OperationRejectedException;
044import org.opends.server.admin.DefaultBehaviorProvider;
045import org.opends.server.admin.DefinedDefaultBehaviorProvider;
046import org.opends.server.admin.DefinitionDecodingException;
047import org.opends.server.admin.DNPropertyDefinition;
048import org.opends.server.admin.DurationPropertyDefinition;
049import org.opends.server.admin.EnumPropertyDefinition;
050import org.opends.server.admin.IntegerPropertyDefinition;
051import org.opends.server.admin.IPAddressPropertyDefinition;
052import org.opends.server.admin.ManagedObjectAlreadyExistsException;
053import org.opends.server.admin.ManagedObjectDefinition;
054import org.opends.server.admin.ManagedObjectNotFoundException;
055import org.opends.server.admin.PropertyException;
056import org.opends.server.admin.PropertyOption;
057import org.opends.server.admin.PropertyProvider;
058import org.opends.server.admin.server.ConfigurationChangeListener;
059import org.opends.server.admin.server.ServerManagedObject;
060import org.opends.server.admin.SingletonRelationDefinition;
061import org.opends.server.admin.std.client.ExternalChangelogDomainCfgClient;
062import org.opends.server.admin.std.client.ReplicationDomainCfgClient;
063import org.opends.server.admin.std.server.ExternalChangelogDomainCfg;
064import org.opends.server.admin.std.server.ReplicationDomainCfg;
065import org.opends.server.admin.StringPropertyDefinition;
066import org.opends.server.admin.Tag;
067import org.opends.server.admin.TopCfgDefn;
068import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
069import org.opends.server.types.DN;
070
071
072
073/**
074 * An interface for querying the Replication Domain managed object
075 * definition meta information.
076 * <p>
077 * A Replication Domain comprises of several Directory Servers sharing
078 * the same synchronized set of data.
079 */
080public final class ReplicationDomainCfgDefn extends ManagedObjectDefinition<ReplicationDomainCfgClient, ReplicationDomainCfg> {
081
082  // The singleton configuration definition instance.
083  private static final ReplicationDomainCfgDefn INSTANCE = new ReplicationDomainCfgDefn();
084
085
086
087  /**
088   * Defines the set of permissable values for the "assured-type" property.
089   * <p>
090   * Defines the assured replication mode of the replicated domain.
091   * <p>
092   * The assured replication can be disabled or enabled. When enabled,
093   * two modes are available: Safe Data or Safe Read modes.
094   */
095  public static enum AssuredType {
096
097    /**
098     * Assured replication is not enabled. Updates sent for
099     * replication (for being replayed on other LDAP servers in the
100     * topology) are sent without waiting for any acknowledgment and
101     * the LDAP client call returns immediately.
102     */
103    NOT_ASSURED("not-assured"),
104
105
106
107    /**
108     * Assured replication is enabled in Safe Data mode: updates sent
109     * for replication are subject to acknowledgment from the
110     * replication servers that have the same group ID as the local
111     * server (defined with the group-id property). The number of
112     * acknowledgments to expect is defined by the assured-sd-level
113     * property. After acknowledgments are received, LDAP client call
114     * returns.
115     */
116    SAFE_DATA("safe-data"),
117
118
119
120    /**
121     * Assured replication is enabled in Safe Read mode: updates sent
122     * for replication are subject to acknowledgments from the LDAP
123     * servers in the topology that have the same group ID as the local
124     * server (defined with the group-id property). After
125     * acknowledgments are received, LDAP client call returns.
126     */
127    SAFE_READ("safe-read");
128
129
130
131    // String representation of the value.
132    private final String name;
133
134
135
136    // Private constructor.
137    private AssuredType(String name) { this.name = name; }
138
139
140
141    /**
142     * {@inheritDoc}
143     */
144    public String toString() { return name; }
145
146  }
147
148
149
150  /**
151   * Defines the set of permissable values for the "isolation-policy" property.
152   * <p>
153   * Specifies the behavior of the directory server if a write
154   * operation is attempted on the data within the Replication Domain
155   * when none of the configured Replication Servers are available.
156   */
157  public static enum IsolationPolicy {
158
159    /**
160     * Indicates that updates should be accepted even though it is not
161     * possible to send them to any Replication Server. Best effort is
162     * made to re-send those updates to a Replication Servers when one
163     * of them is available, however those changes are at risk because
164     * they are only available from the historical information. This
165     * mode can also introduce high replication latency.
166     */
167    ACCEPT_ALL_UPDATES("accept-all-updates"),
168
169
170
171    /**
172     * Indicates that all updates attempted on this Replication Domain
173     * are rejected when no Replication Server is available.
174     */
175    REJECT_ALL_UPDATES("reject-all-updates");
176
177
178
179    // String representation of the value.
180    private final String name;
181
182
183
184    // Private constructor.
185    private IsolationPolicy(String name) { this.name = name; }
186
187
188
189    /**
190     * {@inheritDoc}
191     */
192    public String toString() { return name; }
193
194  }
195
196
197
198  // The "assured-sd-level" property definition.
199  private static final IntegerPropertyDefinition PD_ASSURED_SD_LEVEL;
200
201
202
203  // The "assured-timeout" property definition.
204  private static final DurationPropertyDefinition PD_ASSURED_TIMEOUT;
205
206
207
208  // The "assured-type" property definition.
209  private static final EnumPropertyDefinition<AssuredType> PD_ASSURED_TYPE;
210
211
212
213  // The "base-dn" property definition.
214  private static final DNPropertyDefinition PD_BASE_DN;
215
216
217
218  // The "changetime-heartbeat-interval" property definition.
219  private static final DurationPropertyDefinition PD_CHANGETIME_HEARTBEAT_INTERVAL;
220
221
222
223  // The "conflicts-historical-purge-delay" property definition.
224  private static final DurationPropertyDefinition PD_CONFLICTS_HISTORICAL_PURGE_DELAY;
225
226
227
228  // The "fractional-exclude" property definition.
229  private static final StringPropertyDefinition PD_FRACTIONAL_EXCLUDE;
230
231
232
233  // The "fractional-include" property definition.
234  private static final StringPropertyDefinition PD_FRACTIONAL_INCLUDE;
235
236
237
238  // The "group-id" property definition.
239  private static final IntegerPropertyDefinition PD_GROUP_ID;
240
241
242
243  // The "heartbeat-interval" property definition.
244  private static final DurationPropertyDefinition PD_HEARTBEAT_INTERVAL;
245
246
247
248  // The "initialization-window-size" property definition.
249  private static final IntegerPropertyDefinition PD_INITIALIZATION_WINDOW_SIZE;
250
251
252
253  // The "isolation-policy" property definition.
254  private static final EnumPropertyDefinition<IsolationPolicy> PD_ISOLATION_POLICY;
255
256
257
258  // The "log-changenumber" property definition.
259  private static final BooleanPropertyDefinition PD_LOG_CHANGENUMBER;
260
261
262
263  // The "referrals-url" property definition.
264  private static final StringPropertyDefinition PD_REFERRALS_URL;
265
266
267
268  // The "replication-server" property definition.
269  private static final StringPropertyDefinition PD_REPLICATION_SERVER;
270
271
272
273  // The "server-id" property definition.
274  private static final IntegerPropertyDefinition PD_SERVER_ID;
275
276
277
278  // The "solve-conflicts" property definition.
279  private static final BooleanPropertyDefinition PD_SOLVE_CONFLICTS;
280
281
282
283  // The "source-address" property definition.
284  private static final IPAddressPropertyDefinition PD_SOURCE_ADDRESS;
285
286
287
288  // The "window-size" property definition.
289  private static final IntegerPropertyDefinition PD_WINDOW_SIZE;
290
291
292
293  // The "external-changelog-domain" relation definition.
294  private static final SingletonRelationDefinition<ExternalChangelogDomainCfgClient, ExternalChangelogDomainCfg> RD_EXTERNAL_CHANGELOG_DOMAIN;
295
296
297
298  // Build the "assured-sd-level" property definition.
299  static {
300      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "assured-sd-level");
301      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "assured-sd-level"));
302      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("1");
303      builder.setDefaultBehaviorProvider(provider);
304      builder.setUpperLimit(127);
305      builder.setLowerLimit(1);
306      PD_ASSURED_SD_LEVEL = builder.getInstance();
307      INSTANCE.registerPropertyDefinition(PD_ASSURED_SD_LEVEL);
308  }
309
310
311
312  // Build the "assured-timeout" property definition.
313  static {
314      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "assured-timeout");
315      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "assured-timeout"));
316      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("2000ms");
317      builder.setDefaultBehaviorProvider(provider);
318      builder.setBaseUnit("ms");
319      builder.setLowerLimit("1");
320      PD_ASSURED_TIMEOUT = builder.getInstance();
321      INSTANCE.registerPropertyDefinition(PD_ASSURED_TIMEOUT);
322  }
323
324
325
326  // Build the "assured-type" property definition.
327  static {
328      EnumPropertyDefinition.Builder<AssuredType> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "assured-type");
329      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "assured-type"));
330      DefaultBehaviorProvider<AssuredType> provider = new DefinedDefaultBehaviorProvider<AssuredType>("not-assured");
331      builder.setDefaultBehaviorProvider(provider);
332      builder.setEnumClass(AssuredType.class);
333      PD_ASSURED_TYPE = builder.getInstance();
334      INSTANCE.registerPropertyDefinition(PD_ASSURED_TYPE);
335  }
336
337
338
339  // Build the "base-dn" property definition.
340  static {
341      DNPropertyDefinition.Builder builder = DNPropertyDefinition.createBuilder(INSTANCE, "base-dn");
342      builder.setOption(PropertyOption.READ_ONLY);
343      builder.setOption(PropertyOption.MANDATORY);
344      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "base-dn"));
345      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<DN>());
346      PD_BASE_DN = builder.getInstance();
347      INSTANCE.registerPropertyDefinition(PD_BASE_DN);
348  }
349
350
351
352  // Build the "changetime-heartbeat-interval" property definition.
353  static {
354      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "changetime-heartbeat-interval");
355      builder.setOption(PropertyOption.ADVANCED);
356      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "changetime-heartbeat-interval"));
357      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("1000ms");
358      builder.setDefaultBehaviorProvider(provider);
359      builder.setBaseUnit("ms");
360      builder.setLowerLimit("0");
361      PD_CHANGETIME_HEARTBEAT_INTERVAL = builder.getInstance();
362      INSTANCE.registerPropertyDefinition(PD_CHANGETIME_HEARTBEAT_INTERVAL);
363  }
364
365
366
367  // Build the "conflicts-historical-purge-delay" property definition.
368  static {
369      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "conflicts-historical-purge-delay");
370      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "conflicts-historical-purge-delay"));
371      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("1440m");
372      builder.setDefaultBehaviorProvider(provider);
373      builder.setAllowUnlimited(false);
374      builder.setBaseUnit("m");
375      PD_CONFLICTS_HISTORICAL_PURGE_DELAY = builder.getInstance();
376      INSTANCE.registerPropertyDefinition(PD_CONFLICTS_HISTORICAL_PURGE_DELAY);
377  }
378
379
380
381  // Build the "fractional-exclude" property definition.
382  static {
383      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "fractional-exclude");
384      builder.setOption(PropertyOption.MULTI_VALUED);
385      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "fractional-exclude"));
386      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
387      builder.setPattern("^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$", "OC:AT[,...,AT]");
388      PD_FRACTIONAL_EXCLUDE = builder.getInstance();
389      INSTANCE.registerPropertyDefinition(PD_FRACTIONAL_EXCLUDE);
390  }
391
392
393
394  // Build the "fractional-include" property definition.
395  static {
396      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "fractional-include");
397      builder.setOption(PropertyOption.MULTI_VALUED);
398      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "fractional-include"));
399      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
400      builder.setPattern("^((([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)|\\*):(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+)(,(([a-zA-Z]([a-zA-Z]|[0-9]|-|;)*+)|(0|([1-9]([0-9])*+))(\\.(0|([1-9]([0-9])*+)))*+))*+$", "OC:AT[,...,AT]");
401      PD_FRACTIONAL_INCLUDE = builder.getInstance();
402      INSTANCE.registerPropertyDefinition(PD_FRACTIONAL_INCLUDE);
403  }
404
405
406
407  // Build the "group-id" property definition.
408  static {
409      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "group-id");
410      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "group-id"));
411      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("1");
412      builder.setDefaultBehaviorProvider(provider);
413      builder.setUpperLimit(127);
414      builder.setLowerLimit(1);
415      PD_GROUP_ID = builder.getInstance();
416      INSTANCE.registerPropertyDefinition(PD_GROUP_ID);
417  }
418
419
420
421  // Build the "heartbeat-interval" property definition.
422  static {
423      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "heartbeat-interval");
424      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "heartbeat-interval"));
425      DefaultBehaviorProvider<Long> provider = new DefinedDefaultBehaviorProvider<Long>("10000ms");
426      builder.setDefaultBehaviorProvider(provider);
427      builder.setBaseUnit("ms");
428      builder.setLowerLimit("100");
429      PD_HEARTBEAT_INTERVAL = builder.getInstance();
430      INSTANCE.registerPropertyDefinition(PD_HEARTBEAT_INTERVAL);
431  }
432
433
434
435  // Build the "initialization-window-size" property definition.
436  static {
437      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "initialization-window-size");
438      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "initialization-window-size"));
439      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("100");
440      builder.setDefaultBehaviorProvider(provider);
441      PD_INITIALIZATION_WINDOW_SIZE = builder.getInstance();
442      INSTANCE.registerPropertyDefinition(PD_INITIALIZATION_WINDOW_SIZE);
443  }
444
445
446
447  // Build the "isolation-policy" property definition.
448  static {
449      EnumPropertyDefinition.Builder<IsolationPolicy> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "isolation-policy");
450      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "isolation-policy"));
451      DefaultBehaviorProvider<IsolationPolicy> provider = new DefinedDefaultBehaviorProvider<IsolationPolicy>("reject-all-updates");
452      builder.setDefaultBehaviorProvider(provider);
453      builder.setEnumClass(IsolationPolicy.class);
454      PD_ISOLATION_POLICY = builder.getInstance();
455      INSTANCE.registerPropertyDefinition(PD_ISOLATION_POLICY);
456  }
457
458
459
460  // Build the "log-changenumber" property definition.
461  static {
462      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "log-changenumber");
463      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "log-changenumber"));
464      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
465      builder.setDefaultBehaviorProvider(provider);
466      PD_LOG_CHANGENUMBER = builder.getInstance();
467      INSTANCE.registerPropertyDefinition(PD_LOG_CHANGENUMBER);
468  }
469
470
471
472  // Build the "referrals-url" property definition.
473  static {
474      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "referrals-url");
475      builder.setOption(PropertyOption.MULTI_VALUED);
476      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "referrals-url"));
477      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
478      builder.setPattern("^[lL][dD][aA][pP][sS]?://.+$", "LDAP URL");
479      PD_REFERRALS_URL = builder.getInstance();
480      INSTANCE.registerPropertyDefinition(PD_REFERRALS_URL);
481  }
482
483
484
485  // Build the "replication-server" property definition.
486  static {
487      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "replication-server");
488      builder.setOption(PropertyOption.MULTI_VALUED);
489      builder.setOption(PropertyOption.MANDATORY);
490      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "replication-server"));
491      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
492      builder.setPattern("^.+:[0-9]+$", "HOST:PORT");
493      PD_REPLICATION_SERVER = builder.getInstance();
494      INSTANCE.registerPropertyDefinition(PD_REPLICATION_SERVER);
495  }
496
497
498
499  // Build the "server-id" property definition.
500  static {
501      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "server-id");
502      builder.setOption(PropertyOption.READ_ONLY);
503      builder.setOption(PropertyOption.MANDATORY);
504      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "server-id"));
505      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Integer>());
506      builder.setUpperLimit(65535);
507      builder.setLowerLimit(1);
508      PD_SERVER_ID = builder.getInstance();
509      INSTANCE.registerPropertyDefinition(PD_SERVER_ID);
510  }
511
512
513
514  // Build the "solve-conflicts" property definition.
515  static {
516      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "solve-conflicts");
517      builder.setOption(PropertyOption.ADVANCED);
518      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "solve-conflicts"));
519      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("true");
520      builder.setDefaultBehaviorProvider(provider);
521      PD_SOLVE_CONFLICTS = builder.getInstance();
522      INSTANCE.registerPropertyDefinition(PD_SOLVE_CONFLICTS);
523  }
524
525
526
527  // Build the "source-address" property definition.
528  static {
529      IPAddressPropertyDefinition.Builder builder = IPAddressPropertyDefinition.createBuilder(INSTANCE, "source-address");
530      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "source-address"));
531      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<InetAddress>(INSTANCE, "source-address"));
532      PD_SOURCE_ADDRESS = builder.getInstance();
533      INSTANCE.registerPropertyDefinition(PD_SOURCE_ADDRESS);
534  }
535
536
537
538  // Build the "window-size" property definition.
539  static {
540      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "window-size");
541      builder.setOption(PropertyOption.ADVANCED);
542      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "window-size"));
543      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("100000");
544      builder.setDefaultBehaviorProvider(provider);
545      PD_WINDOW_SIZE = builder.getInstance();
546      INSTANCE.registerPropertyDefinition(PD_WINDOW_SIZE);
547  }
548
549
550
551  // Build the "external-changelog-domain" relation definition.
552  static {
553    SingletonRelationDefinition.Builder<ExternalChangelogDomainCfgClient, ExternalChangelogDomainCfg> builder =
554      new SingletonRelationDefinition.Builder<ExternalChangelogDomainCfgClient, ExternalChangelogDomainCfg>(INSTANCE, "external-changelog-domain", ExternalChangelogDomainCfgDefn.getInstance());
555    RD_EXTERNAL_CHANGELOG_DOMAIN = builder.getInstance();
556    INSTANCE.registerRelationDefinition(RD_EXTERNAL_CHANGELOG_DOMAIN);
557  }
558
559
560
561  // Register the tags associated with this managed object definition.
562  static {
563    INSTANCE.registerTag(Tag.valueOf("replication"));
564  }
565
566
567
568  /**
569   * Get the Replication Domain configuration definition singleton.
570   *
571   * @return Returns the Replication Domain configuration definition
572   *         singleton.
573   */
574  public static ReplicationDomainCfgDefn getInstance() {
575    return INSTANCE;
576  }
577
578
579
580  /**
581   * Private constructor.
582   */
583  private ReplicationDomainCfgDefn() {
584    super("replication-domain", TopCfgDefn.getInstance());
585  }
586
587
588
589  /**
590   * {@inheritDoc}
591   */
592  public ReplicationDomainCfgClient createClientConfiguration(
593      ManagedObject<? extends ReplicationDomainCfgClient> impl) {
594    return new ReplicationDomainCfgClientImpl(impl);
595  }
596
597
598
599  /**
600   * {@inheritDoc}
601   */
602  public ReplicationDomainCfg createServerConfiguration(
603      ServerManagedObject<? extends ReplicationDomainCfg> impl) {
604    return new ReplicationDomainCfgServerImpl(impl);
605  }
606
607
608
609  /**
610   * {@inheritDoc}
611   */
612  public Class<ReplicationDomainCfg> getServerConfigurationClass() {
613    return ReplicationDomainCfg.class;
614  }
615
616
617
618  /**
619   * Get the "assured-sd-level" property definition.
620   * <p>
621   * The level of acknowledgment for Safe Data assured sub mode.
622   * <p>
623   * When assured replication is configured in Safe Data mode, this
624   * value defines the number of replication servers (with the same
625   * group ID of the local server) that should acknowledge the sent
626   * update before the LDAP client call can return.
627   *
628   * @return Returns the "assured-sd-level" property definition.
629   */
630  public IntegerPropertyDefinition getAssuredSdLevelPropertyDefinition() {
631    return PD_ASSURED_SD_LEVEL;
632  }
633
634
635
636  /**
637   * Get the "assured-timeout" property definition.
638   * <p>
639   * The timeout value when waiting for assured replication
640   * acknowledgments.
641   * <p>
642   * Defines the amount of milliseconds the server will wait for
643   * assured acknowledgments (in either Safe Data or Safe Read assured
644   * replication modes) before returning anyway the LDAP client call.
645   *
646   * @return Returns the "assured-timeout" property definition.
647   */
648  public DurationPropertyDefinition getAssuredTimeoutPropertyDefinition() {
649    return PD_ASSURED_TIMEOUT;
650  }
651
652
653
654  /**
655   * Get the "assured-type" property definition.
656   * <p>
657   * Defines the assured replication mode of the replicated domain.
658   * <p>
659   * The assured replication can be disabled or enabled. When enabled,
660   * two modes are available: Safe Data or Safe Read modes.
661   *
662   * @return Returns the "assured-type" property definition.
663   */
664  public EnumPropertyDefinition<AssuredType> getAssuredTypePropertyDefinition() {
665    return PD_ASSURED_TYPE;
666  }
667
668
669
670  /**
671   * Get the "base-dn" property definition.
672   * <p>
673   * Specifies the base DN of the replicated data.
674   *
675   * @return Returns the "base-dn" property definition.
676   */
677  public DNPropertyDefinition getBaseDNPropertyDefinition() {
678    return PD_BASE_DN;
679  }
680
681
682
683  /**
684   * Get the "changetime-heartbeat-interval" property definition.
685   * <p>
686   * Specifies the heart-beat interval that the directory server will
687   * use when sending its local change time to the Replication Server.
688   * <p>
689   * The directory server sends a regular heart-beat to the
690   * Replication within the specified interval. The heart-beat
691   * indicates the change time of the directory server to the
692   * Replication Server.
693   *
694   * @return Returns the "changetime-heartbeat-interval" property definition.
695   */
696  public DurationPropertyDefinition getChangetimeHeartbeatIntervalPropertyDefinition() {
697    return PD_CHANGETIME_HEARTBEAT_INTERVAL;
698  }
699
700
701
702  /**
703   * Get the "conflicts-historical-purge-delay" property definition.
704   * <p>
705   * This delay indicates the time (in minutes) the domain keeps the
706   * historical information necessary to solve conflicts.When a change
707   * stored in the historical part of the user entry has a date (from
708   * its replication ChangeNumber) older than this delay, it is
709   * candidate to be purged. The purge is applied on 2 events: modify
710   * of the entry, dedicated purge task.
711   *
712   * @return Returns the "conflicts-historical-purge-delay" property definition.
713   */
714  public DurationPropertyDefinition getConflictsHistoricalPurgeDelayPropertyDefinition() {
715    return PD_CONFLICTS_HISTORICAL_PURGE_DELAY;
716  }
717
718
719
720  /**
721   * Get the "fractional-exclude" property definition.
722   * <p>
723   * Allows to exclude some attributes to replicate to this server.
724   * <p>
725   * If fractional-exclude configuration attribute is used, attributes
726   * specified in this attribute will be ignored (not
727   * added/modified/deleted) when an operation performed from another
728   * directory server is being replayed in the local server. Note that
729   * the usage of this configuration attribute is mutually exclusive
730   * with the usage of the fractional-include attribute.
731   *
732   * @return Returns the "fractional-exclude" property definition.
733   */
734  public StringPropertyDefinition getFractionalExcludePropertyDefinition() {
735    return PD_FRACTIONAL_EXCLUDE;
736  }
737
738
739
740  /**
741   * Get the "fractional-include" property definition.
742   * <p>
743   * Allows to include some attributes to replicate to this server.
744   * <p>
745   * If fractional-include configuration attribute is used, only
746   * attributes specified in this attribute will be
747   * added/modified/deleted when an operation performed from another
748   * directory server is being replayed in the local server. Note that
749   * the usage of this configuration attribute is mutually exclusive
750   * with the usage of the fractional-exclude attribute.
751   *
752   * @return Returns the "fractional-include" property definition.
753   */
754  public StringPropertyDefinition getFractionalIncludePropertyDefinition() {
755    return PD_FRACTIONAL_INCLUDE;
756  }
757
758
759
760  /**
761   * Get the "group-id" property definition.
762   * <p>
763   * The group ID associated with this replicated domain.
764   * <p>
765   * This value defines the group ID of the replicated domain. The
766   * replication system will preferably connect and send updates to
767   * replicate to a replication server with the same group ID as its
768   * own one (the local server group ID).
769   *
770   * @return Returns the "group-id" property definition.
771   */
772  public IntegerPropertyDefinition getGroupIdPropertyDefinition() {
773    return PD_GROUP_ID;
774  }
775
776
777
778  /**
779   * Get the "heartbeat-interval" property definition.
780   * <p>
781   * Specifies the heart-beat interval that the directory server will
782   * use when communicating with Replication Servers.
783   * <p>
784   * The directory server expects a regular heart-beat coming from the
785   * Replication Server within the specified interval. If a heartbeat
786   * is not received within the interval, the Directory Server closes
787   * its connection and connects to another Replication Server.
788   *
789   * @return Returns the "heartbeat-interval" property definition.
790   */
791  public DurationPropertyDefinition getHeartbeatIntervalPropertyDefinition() {
792    return PD_HEARTBEAT_INTERVAL;
793  }
794
795
796
797  /**
798   * Get the "initialization-window-size" property definition.
799   * <p>
800   * Specifies the window size that this directory server may use when
801   * communicating with remote Directory Servers for initialization.
802   *
803   * @return Returns the "initialization-window-size" property definition.
804   */
805  public IntegerPropertyDefinition getInitializationWindowSizePropertyDefinition() {
806    return PD_INITIALIZATION_WINDOW_SIZE;
807  }
808
809
810
811  /**
812   * Get the "isolation-policy" property definition.
813   * <p>
814   * Specifies the behavior of the directory server if a write
815   * operation is attempted on the data within the Replication Domain
816   * when none of the configured Replication Servers are available.
817   *
818   * @return Returns the "isolation-policy" property definition.
819   */
820  public EnumPropertyDefinition<IsolationPolicy> getIsolationPolicyPropertyDefinition() {
821    return PD_ISOLATION_POLICY;
822  }
823
824
825
826  /**
827   * Get the "log-changenumber" property definition.
828   * <p>
829   * Indicates if this server logs the ChangeNumber in access log.
830   * <p>
831   * This boolean indicates if the domain should log the ChangeNumber
832   * of replicated operations in the access log.
833   *
834   * @return Returns the "log-changenumber" property definition.
835   */
836  public BooleanPropertyDefinition getLogChangenumberPropertyDefinition() {
837    return PD_LOG_CHANGENUMBER;
838  }
839
840
841
842  /**
843   * Get the "referrals-url" property definition.
844   * <p>
845   * The URLs other LDAP servers should use to refer to the local
846   * server.
847   * <p>
848   * URLs used by peer servers in the topology to refer to the local
849   * server through LDAP referrals. If this attribute is not defined,
850   * every URLs available to access this server will be used. If
851   * defined, only URLs specified here will be used.
852   *
853   * @return Returns the "referrals-url" property definition.
854   */
855  public StringPropertyDefinition getReferralsUrlPropertyDefinition() {
856    return PD_REFERRALS_URL;
857  }
858
859
860
861  /**
862   * Get the "replication-server" property definition.
863   * <p>
864   * Specifies the addresses of the Replication Servers within the
865   * Replication Domain to which the directory server should try to
866   * connect at startup time.
867   * <p>
868   * Addresses must be specified using the syntax: hostname:port
869   *
870   * @return Returns the "replication-server" property definition.
871   */
872  public StringPropertyDefinition getReplicationServerPropertyDefinition() {
873    return PD_REPLICATION_SERVER;
874  }
875
876
877
878  /**
879   * Get the "server-id" property definition.
880   * <p>
881   * Specifies a unique identifier for the directory server within the
882   * Replication Domain.
883   * <p>
884   * Each directory server within the same Replication Domain must
885   * have a different server ID. A directory server which is a member
886   * of multiple Replication Domains may use the same server ID for
887   * each of its Replication Domain configurations.
888   *
889   * @return Returns the "server-id" property definition.
890   */
891  public IntegerPropertyDefinition getServerIdPropertyDefinition() {
892    return PD_SERVER_ID;
893  }
894
895
896
897  /**
898   * Get the "solve-conflicts" property definition.
899   * <p>
900   * Indicates if this server solves conflict.
901   * <p>
902   * This boolean indicates if this domain keeps the historical
903   * information necessary to solve conflicts. When set to false the
904   * server will not maintain historical information and will therefore
905   * not be able to solve conflict. This should therefore be done only
906   * if the replication is used in a single master type of deployment.
907   *
908   * @return Returns the "solve-conflicts" property definition.
909   */
910  public BooleanPropertyDefinition getSolveConflictsPropertyDefinition() {
911    return PD_SOLVE_CONFLICTS;
912  }
913
914
915
916  /**
917   * Get the "source-address" property definition.
918   * <p>
919   * If specified, the server will bind to the address before
920   * connecting to the remote server.
921   * <p>
922   * The address must be one assigned to an existing network
923   * interface.
924   *
925   * @return Returns the "source-address" property definition.
926   */
927  public IPAddressPropertyDefinition getSourceAddressPropertyDefinition() {
928    return PD_SOURCE_ADDRESS;
929  }
930
931
932
933  /**
934   * Get the "window-size" property definition.
935   * <p>
936   * Specifies the window size that the directory server will use when
937   * communicating with Replication Servers.
938   * <p>
939   * This option may be deprecated and removed in future releases.
940   *
941   * @return Returns the "window-size" property definition.
942   */
943  public IntegerPropertyDefinition getWindowSizePropertyDefinition() {
944    return PD_WINDOW_SIZE;
945  }
946
947
948
949  /**
950   * Get the "external-changelog-domain" relation definition.
951   *
952   * @return Returns the "external-changelog-domain" relation definition.
953   */
954  public SingletonRelationDefinition<ExternalChangelogDomainCfgClient,ExternalChangelogDomainCfg> getExternalChangelogDomainRelationDefinition() {
955    return RD_EXTERNAL_CHANGELOG_DOMAIN;
956  }
957
958
959
960  /**
961   * Managed object client implementation.
962   */
963  private static class ReplicationDomainCfgClientImpl implements
964    ReplicationDomainCfgClient {
965
966    // Private implementation.
967    private ManagedObject<? extends ReplicationDomainCfgClient> impl;
968
969
970
971    // Private constructor.
972    private ReplicationDomainCfgClientImpl(
973        ManagedObject<? extends ReplicationDomainCfgClient> impl) {
974      this.impl = impl;
975    }
976
977
978
979    /**
980     * {@inheritDoc}
981     */
982    public int getAssuredSdLevel() {
983      return impl.getPropertyValue(INSTANCE.getAssuredSdLevelPropertyDefinition());
984    }
985
986
987
988    /**
989     * {@inheritDoc}
990     */
991    public void setAssuredSdLevel(Integer value) {
992      impl.setPropertyValue(INSTANCE.getAssuredSdLevelPropertyDefinition(), value);
993    }
994
995
996
997    /**
998     * {@inheritDoc}
999     */
1000    public long getAssuredTimeout() {
1001      return impl.getPropertyValue(INSTANCE.getAssuredTimeoutPropertyDefinition());
1002    }
1003
1004
1005
1006    /**
1007     * {@inheritDoc}
1008     */
1009    public void setAssuredTimeout(Long value) {
1010      impl.setPropertyValue(INSTANCE.getAssuredTimeoutPropertyDefinition(), value);
1011    }
1012
1013
1014
1015    /**
1016     * {@inheritDoc}
1017     */
1018    public AssuredType getAssuredType() {
1019      return impl.getPropertyValue(INSTANCE.getAssuredTypePropertyDefinition());
1020    }
1021
1022
1023
1024    /**
1025     * {@inheritDoc}
1026     */
1027    public void setAssuredType(AssuredType value) {
1028      impl.setPropertyValue(INSTANCE.getAssuredTypePropertyDefinition(), value);
1029    }
1030
1031
1032
1033    /**
1034     * {@inheritDoc}
1035     */
1036    public DN getBaseDN() {
1037      return impl.getPropertyValue(INSTANCE.getBaseDNPropertyDefinition());
1038    }
1039
1040
1041
1042    /**
1043     * {@inheritDoc}
1044     */
1045    public void setBaseDN(DN value) throws PropertyException {
1046      impl.setPropertyValue(INSTANCE.getBaseDNPropertyDefinition(), value);
1047    }
1048
1049
1050
1051    /**
1052     * {@inheritDoc}
1053     */
1054    public long getChangetimeHeartbeatInterval() {
1055      return impl.getPropertyValue(INSTANCE.getChangetimeHeartbeatIntervalPropertyDefinition());
1056    }
1057
1058
1059
1060    /**
1061     * {@inheritDoc}
1062     */
1063    public void setChangetimeHeartbeatInterval(Long value) {
1064      impl.setPropertyValue(INSTANCE.getChangetimeHeartbeatIntervalPropertyDefinition(), value);
1065    }
1066
1067
1068
1069    /**
1070     * {@inheritDoc}
1071     */
1072    public long getConflictsHistoricalPurgeDelay() {
1073      return impl.getPropertyValue(INSTANCE.getConflictsHistoricalPurgeDelayPropertyDefinition());
1074    }
1075
1076
1077
1078    /**
1079     * {@inheritDoc}
1080     */
1081    public void setConflictsHistoricalPurgeDelay(Long value) {
1082      impl.setPropertyValue(INSTANCE.getConflictsHistoricalPurgeDelayPropertyDefinition(), value);
1083    }
1084
1085
1086
1087    /**
1088     * {@inheritDoc}
1089     */
1090    public SortedSet<String> getFractionalExclude() {
1091      return impl.getPropertyValues(INSTANCE.getFractionalExcludePropertyDefinition());
1092    }
1093
1094
1095
1096    /**
1097     * {@inheritDoc}
1098     */
1099    public void setFractionalExclude(Collection<String> values) {
1100      impl.setPropertyValues(INSTANCE.getFractionalExcludePropertyDefinition(), values);
1101    }
1102
1103
1104
1105    /**
1106     * {@inheritDoc}
1107     */
1108    public SortedSet<String> getFractionalInclude() {
1109      return impl.getPropertyValues(INSTANCE.getFractionalIncludePropertyDefinition());
1110    }
1111
1112
1113
1114    /**
1115     * {@inheritDoc}
1116     */
1117    public void setFractionalInclude(Collection<String> values) {
1118      impl.setPropertyValues(INSTANCE.getFractionalIncludePropertyDefinition(), values);
1119    }
1120
1121
1122
1123    /**
1124     * {@inheritDoc}
1125     */
1126    public int getGroupId() {
1127      return impl.getPropertyValue(INSTANCE.getGroupIdPropertyDefinition());
1128    }
1129
1130
1131
1132    /**
1133     * {@inheritDoc}
1134     */
1135    public void setGroupId(Integer value) {
1136      impl.setPropertyValue(INSTANCE.getGroupIdPropertyDefinition(), value);
1137    }
1138
1139
1140
1141    /**
1142     * {@inheritDoc}
1143     */
1144    public long getHeartbeatInterval() {
1145      return impl.getPropertyValue(INSTANCE.getHeartbeatIntervalPropertyDefinition());
1146    }
1147
1148
1149
1150    /**
1151     * {@inheritDoc}
1152     */
1153    public void setHeartbeatInterval(Long value) {
1154      impl.setPropertyValue(INSTANCE.getHeartbeatIntervalPropertyDefinition(), value);
1155    }
1156
1157
1158
1159    /**
1160     * {@inheritDoc}
1161     */
1162    public int getInitializationWindowSize() {
1163      return impl.getPropertyValue(INSTANCE.getInitializationWindowSizePropertyDefinition());
1164    }
1165
1166
1167
1168    /**
1169     * {@inheritDoc}
1170     */
1171    public void setInitializationWindowSize(Integer value) {
1172      impl.setPropertyValue(INSTANCE.getInitializationWindowSizePropertyDefinition(), value);
1173    }
1174
1175
1176
1177    /**
1178     * {@inheritDoc}
1179     */
1180    public IsolationPolicy getIsolationPolicy() {
1181      return impl.getPropertyValue(INSTANCE.getIsolationPolicyPropertyDefinition());
1182    }
1183
1184
1185
1186    /**
1187     * {@inheritDoc}
1188     */
1189    public void setIsolationPolicy(IsolationPolicy value) {
1190      impl.setPropertyValue(INSTANCE.getIsolationPolicyPropertyDefinition(), value);
1191    }
1192
1193
1194
1195    /**
1196     * {@inheritDoc}
1197     */
1198    public boolean isLogChangenumber() {
1199      return impl.getPropertyValue(INSTANCE.getLogChangenumberPropertyDefinition());
1200    }
1201
1202
1203
1204    /**
1205     * {@inheritDoc}
1206     */
1207    public void setLogChangenumber(Boolean value) {
1208      impl.setPropertyValue(INSTANCE.getLogChangenumberPropertyDefinition(), value);
1209    }
1210
1211
1212
1213    /**
1214     * {@inheritDoc}
1215     */
1216    public SortedSet<String> getReferralsUrl() {
1217      return impl.getPropertyValues(INSTANCE.getReferralsUrlPropertyDefinition());
1218    }
1219
1220
1221
1222    /**
1223     * {@inheritDoc}
1224     */
1225    public void setReferralsUrl(Collection<String> values) {
1226      impl.setPropertyValues(INSTANCE.getReferralsUrlPropertyDefinition(), values);
1227    }
1228
1229
1230
1231    /**
1232     * {@inheritDoc}
1233     */
1234    public SortedSet<String> getReplicationServer() {
1235      return impl.getPropertyValues(INSTANCE.getReplicationServerPropertyDefinition());
1236    }
1237
1238
1239
1240    /**
1241     * {@inheritDoc}
1242     */
1243    public void setReplicationServer(Collection<String> values) {
1244      impl.setPropertyValues(INSTANCE.getReplicationServerPropertyDefinition(), values);
1245    }
1246
1247
1248
1249    /**
1250     * {@inheritDoc}
1251     */
1252    public Integer getServerId() {
1253      return impl.getPropertyValue(INSTANCE.getServerIdPropertyDefinition());
1254    }
1255
1256
1257
1258    /**
1259     * {@inheritDoc}
1260     */
1261    public void setServerId(int value) throws PropertyException {
1262      impl.setPropertyValue(INSTANCE.getServerIdPropertyDefinition(), value);
1263    }
1264
1265
1266
1267    /**
1268     * {@inheritDoc}
1269     */
1270    public boolean isSolveConflicts() {
1271      return impl.getPropertyValue(INSTANCE.getSolveConflictsPropertyDefinition());
1272    }
1273
1274
1275
1276    /**
1277     * {@inheritDoc}
1278     */
1279    public void setSolveConflicts(Boolean value) {
1280      impl.setPropertyValue(INSTANCE.getSolveConflictsPropertyDefinition(), value);
1281    }
1282
1283
1284
1285    /**
1286     * {@inheritDoc}
1287     */
1288    public InetAddress getSourceAddress() {
1289      return impl.getPropertyValue(INSTANCE.getSourceAddressPropertyDefinition());
1290    }
1291
1292
1293
1294    /**
1295     * {@inheritDoc}
1296     */
1297    public void setSourceAddress(InetAddress value) {
1298      impl.setPropertyValue(INSTANCE.getSourceAddressPropertyDefinition(), value);
1299    }
1300
1301
1302
1303    /**
1304     * {@inheritDoc}
1305     */
1306    public int getWindowSize() {
1307      return impl.getPropertyValue(INSTANCE.getWindowSizePropertyDefinition());
1308    }
1309
1310
1311
1312    /**
1313     * {@inheritDoc}
1314     */
1315    public void setWindowSize(Integer value) {
1316      impl.setPropertyValue(INSTANCE.getWindowSizePropertyDefinition(), value);
1317    }
1318
1319
1320
1321    /**
1322     * {@inheritDoc}
1323     */
1324    public ExternalChangelogDomainCfgClient getExternalChangelogDomain()
1325        throws DefinitionDecodingException, ManagedObjectDecodingException,
1326        ManagedObjectNotFoundException, ConcurrentModificationException,
1327        AuthorizationException, CommunicationException {
1328      return impl.getChild(INSTANCE.getExternalChangelogDomainRelationDefinition()).getConfiguration();
1329    }
1330
1331
1332
1333    /**
1334     * {@inheritDoc}
1335     */
1336    public ManagedObjectDefinition<? extends ReplicationDomainCfgClient, ? extends ReplicationDomainCfg> definition() {
1337      return INSTANCE;
1338    }
1339
1340
1341
1342    /**
1343     * {@inheritDoc}
1344     */
1345    public PropertyProvider properties() {
1346      return impl;
1347    }
1348
1349
1350
1351    /**
1352     * {@inheritDoc}
1353     */
1354    public void commit() throws ManagedObjectAlreadyExistsException,
1355        MissingMandatoryPropertiesException, ConcurrentModificationException,
1356        OperationRejectedException, AuthorizationException,
1357        CommunicationException {
1358      impl.commit();
1359    }
1360
1361
1362
1363    /** {@inheritDoc} */
1364    public String toString() {
1365      return impl.toString();
1366    }
1367  }
1368
1369
1370
1371  /**
1372   * Managed object server implementation.
1373   */
1374  private static class ReplicationDomainCfgServerImpl implements
1375    ReplicationDomainCfg {
1376
1377    // Private implementation.
1378    private ServerManagedObject<? extends ReplicationDomainCfg> impl;
1379
1380    // The value of the "assured-sd-level" property.
1381    private final int pAssuredSdLevel;
1382
1383    // The value of the "assured-timeout" property.
1384    private final long pAssuredTimeout;
1385
1386    // The value of the "assured-type" property.
1387    private final AssuredType pAssuredType;
1388
1389    // The value of the "base-dn" property.
1390    private final DN pBaseDN;
1391
1392    // The value of the "changetime-heartbeat-interval" property.
1393    private final long pChangetimeHeartbeatInterval;
1394
1395    // The value of the "conflicts-historical-purge-delay" property.
1396    private final long pConflictsHistoricalPurgeDelay;
1397
1398    // The value of the "fractional-exclude" property.
1399    private final SortedSet<String> pFractionalExclude;
1400
1401    // The value of the "fractional-include" property.
1402    private final SortedSet<String> pFractionalInclude;
1403
1404    // The value of the "group-id" property.
1405    private final int pGroupId;
1406
1407    // The value of the "heartbeat-interval" property.
1408    private final long pHeartbeatInterval;
1409
1410    // The value of the "initialization-window-size" property.
1411    private final int pInitializationWindowSize;
1412
1413    // The value of the "isolation-policy" property.
1414    private final IsolationPolicy pIsolationPolicy;
1415
1416    // The value of the "log-changenumber" property.
1417    private final boolean pLogChangenumber;
1418
1419    // The value of the "referrals-url" property.
1420    private final SortedSet<String> pReferralsUrl;
1421
1422    // The value of the "replication-server" property.
1423    private final SortedSet<String> pReplicationServer;
1424
1425    // The value of the "server-id" property.
1426    private final int pServerId;
1427
1428    // The value of the "solve-conflicts" property.
1429    private final boolean pSolveConflicts;
1430
1431    // The value of the "source-address" property.
1432    private final InetAddress pSourceAddress;
1433
1434    // The value of the "window-size" property.
1435    private final int pWindowSize;
1436
1437
1438
1439    // Private constructor.
1440    private ReplicationDomainCfgServerImpl(ServerManagedObject<? extends ReplicationDomainCfg> impl) {
1441      this.impl = impl;
1442      this.pAssuredSdLevel = impl.getPropertyValue(INSTANCE.getAssuredSdLevelPropertyDefinition());
1443      this.pAssuredTimeout = impl.getPropertyValue(INSTANCE.getAssuredTimeoutPropertyDefinition());
1444      this.pAssuredType = impl.getPropertyValue(INSTANCE.getAssuredTypePropertyDefinition());
1445      this.pBaseDN = impl.getPropertyValue(INSTANCE.getBaseDNPropertyDefinition());
1446      this.pChangetimeHeartbeatInterval = impl.getPropertyValue(INSTANCE.getChangetimeHeartbeatIntervalPropertyDefinition());
1447      this.pConflictsHistoricalPurgeDelay = impl.getPropertyValue(INSTANCE.getConflictsHistoricalPurgeDelayPropertyDefinition());
1448      this.pFractionalExclude = impl.getPropertyValues(INSTANCE.getFractionalExcludePropertyDefinition());
1449      this.pFractionalInclude = impl.getPropertyValues(INSTANCE.getFractionalIncludePropertyDefinition());
1450      this.pGroupId = impl.getPropertyValue(INSTANCE.getGroupIdPropertyDefinition());
1451      this.pHeartbeatInterval = impl.getPropertyValue(INSTANCE.getHeartbeatIntervalPropertyDefinition());
1452      this.pInitializationWindowSize = impl.getPropertyValue(INSTANCE.getInitializationWindowSizePropertyDefinition());
1453      this.pIsolationPolicy = impl.getPropertyValue(INSTANCE.getIsolationPolicyPropertyDefinition());
1454      this.pLogChangenumber = impl.getPropertyValue(INSTANCE.getLogChangenumberPropertyDefinition());
1455      this.pReferralsUrl = impl.getPropertyValues(INSTANCE.getReferralsUrlPropertyDefinition());
1456      this.pReplicationServer = impl.getPropertyValues(INSTANCE.getReplicationServerPropertyDefinition());
1457      this.pServerId = impl.getPropertyValue(INSTANCE.getServerIdPropertyDefinition());
1458      this.pSolveConflicts = impl.getPropertyValue(INSTANCE.getSolveConflictsPropertyDefinition());
1459      this.pSourceAddress = impl.getPropertyValue(INSTANCE.getSourceAddressPropertyDefinition());
1460      this.pWindowSize = impl.getPropertyValue(INSTANCE.getWindowSizePropertyDefinition());
1461    }
1462
1463
1464
1465    /**
1466     * {@inheritDoc}
1467     */
1468    public void addChangeListener(
1469        ConfigurationChangeListener<ReplicationDomainCfg> listener) {
1470      impl.registerChangeListener(listener);
1471    }
1472
1473
1474
1475    /**
1476     * {@inheritDoc}
1477     */
1478    public void removeChangeListener(
1479        ConfigurationChangeListener<ReplicationDomainCfg> listener) {
1480      impl.deregisterChangeListener(listener);
1481    }
1482
1483
1484
1485    /**
1486     * {@inheritDoc}
1487     */
1488    public int getAssuredSdLevel() {
1489      return pAssuredSdLevel;
1490    }
1491
1492
1493
1494    /**
1495     * {@inheritDoc}
1496     */
1497    public long getAssuredTimeout() {
1498      return pAssuredTimeout;
1499    }
1500
1501
1502
1503    /**
1504     * {@inheritDoc}
1505     */
1506    public AssuredType getAssuredType() {
1507      return pAssuredType;
1508    }
1509
1510
1511
1512    /**
1513     * {@inheritDoc}
1514     */
1515    public DN getBaseDN() {
1516      return pBaseDN;
1517    }
1518
1519
1520
1521    /**
1522     * {@inheritDoc}
1523     */
1524    public long getChangetimeHeartbeatInterval() {
1525      return pChangetimeHeartbeatInterval;
1526    }
1527
1528
1529
1530    /**
1531     * {@inheritDoc}
1532     */
1533    public long getConflictsHistoricalPurgeDelay() {
1534      return pConflictsHistoricalPurgeDelay;
1535    }
1536
1537
1538
1539    /**
1540     * {@inheritDoc}
1541     */
1542    public SortedSet<String> getFractionalExclude() {
1543      return pFractionalExclude;
1544    }
1545
1546
1547
1548    /**
1549     * {@inheritDoc}
1550     */
1551    public SortedSet<String> getFractionalInclude() {
1552      return pFractionalInclude;
1553    }
1554
1555
1556
1557    /**
1558     * {@inheritDoc}
1559     */
1560    public int getGroupId() {
1561      return pGroupId;
1562    }
1563
1564
1565
1566    /**
1567     * {@inheritDoc}
1568     */
1569    public long getHeartbeatInterval() {
1570      return pHeartbeatInterval;
1571    }
1572
1573
1574
1575    /**
1576     * {@inheritDoc}
1577     */
1578    public int getInitializationWindowSize() {
1579      return pInitializationWindowSize;
1580    }
1581
1582
1583
1584    /**
1585     * {@inheritDoc}
1586     */
1587    public IsolationPolicy getIsolationPolicy() {
1588      return pIsolationPolicy;
1589    }
1590
1591
1592
1593    /**
1594     * {@inheritDoc}
1595     */
1596    public boolean isLogChangenumber() {
1597      return pLogChangenumber;
1598    }
1599
1600
1601
1602    /**
1603     * {@inheritDoc}
1604     */
1605    public SortedSet<String> getReferralsUrl() {
1606      return pReferralsUrl;
1607    }
1608
1609
1610
1611    /**
1612     * {@inheritDoc}
1613     */
1614    public SortedSet<String> getReplicationServer() {
1615      return pReplicationServer;
1616    }
1617
1618
1619
1620    /**
1621     * {@inheritDoc}
1622     */
1623    public int getServerId() {
1624      return pServerId;
1625    }
1626
1627
1628
1629    /**
1630     * {@inheritDoc}
1631     */
1632    public boolean isSolveConflicts() {
1633      return pSolveConflicts;
1634    }
1635
1636
1637
1638    /**
1639     * {@inheritDoc}
1640     */
1641    public InetAddress getSourceAddress() {
1642      return pSourceAddress;
1643    }
1644
1645
1646
1647    /**
1648     * {@inheritDoc}
1649     */
1650    public int getWindowSize() {
1651      return pWindowSize;
1652    }
1653
1654
1655
1656    /**
1657     * {@inheritDoc}
1658     */
1659    public ExternalChangelogDomainCfg getExternalChangelogDomain() throws ConfigException {
1660      return impl.getChild(INSTANCE.getExternalChangelogDomainRelationDefinition()).getConfiguration();
1661    }
1662
1663
1664
1665    /**
1666     * {@inheritDoc}
1667     */
1668    public Class<? extends ReplicationDomainCfg> configurationClass() {
1669      return ReplicationDomainCfg.class;
1670    }
1671
1672
1673
1674    /**
1675     * {@inheritDoc}
1676     */
1677    public DN dn() {
1678      return impl.getDN();
1679    }
1680
1681
1682
1683    /** {@inheritDoc} */
1684    public String toString() {
1685      return impl.toString();
1686    }
1687  }
1688}