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