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.server; 027 028 029 030import java.net.InetAddress; 031import java.util.SortedSet; 032import org.forgerock.opendj.config.server.ConfigException; 033import org.opends.server.admin.Configuration; 034import org.opends.server.admin.server.ConfigurationChangeListener; 035import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.AssuredType; 036import org.opends.server.admin.std.meta.ReplicationDomainCfgDefn.IsolationPolicy; 037import org.opends.server.types.DN; 038 039 040 041/** 042 * A server-side interface for querying Replication Domain settings. 043 * <p> 044 * A Replication Domain comprises of several Directory Servers sharing 045 * the same synchronized set of data. 046 */ 047public interface ReplicationDomainCfg extends Configuration { 048 049 /** 050 * Gets the configuration class associated with this Replication Domain. 051 * 052 * @return Returns the configuration class associated with this Replication Domain. 053 */ 054 Class<? extends ReplicationDomainCfg> configurationClass(); 055 056 057 058 /** 059 * Register to be notified when this Replication Domain is changed. 060 * 061 * @param listener 062 * The Replication Domain configuration change listener. 063 */ 064 void addChangeListener(ConfigurationChangeListener<ReplicationDomainCfg> listener); 065 066 067 068 /** 069 * Deregister an existing Replication Domain configuration change listener. 070 * 071 * @param listener 072 * The Replication Domain configuration change listener. 073 */ 074 void removeChangeListener(ConfigurationChangeListener<ReplicationDomainCfg> listener); 075 076 077 078 /** 079 * Gets the "assured-sd-level" property. 080 * <p> 081 * The level of acknowledgment for Safe Data assured sub mode. 082 * <p> 083 * When assured replication is configured in Safe Data mode, this 084 * value defines the number of replication servers (with the same 085 * group ID of the local server) that should acknowledge the sent 086 * update before the LDAP client call can return. 087 * 088 * @return Returns the value of the "assured-sd-level" property. 089 */ 090 int getAssuredSdLevel(); 091 092 093 094 /** 095 * Gets the "assured-timeout" property. 096 * <p> 097 * The timeout value when waiting for assured replication 098 * acknowledgments. 099 * <p> 100 * Defines the amount of milliseconds the server will wait for 101 * assured acknowledgments (in either Safe Data or Safe Read assured 102 * replication modes) before returning anyway the LDAP client call. 103 * 104 * @return Returns the value of the "assured-timeout" property. 105 */ 106 long getAssuredTimeout(); 107 108 109 110 /** 111 * Gets the "assured-type" property. 112 * <p> 113 * Defines the assured replication mode of the replicated domain. 114 * <p> 115 * The assured replication can be disabled or enabled. When enabled, 116 * two modes are available: Safe Data or Safe Read modes. 117 * 118 * @return Returns the value of the "assured-type" property. 119 */ 120 AssuredType getAssuredType(); 121 122 123 124 /** 125 * Gets the "base-dn" property. 126 * <p> 127 * Specifies the base DN of the replicated data. 128 * 129 * @return Returns the value of the "base-dn" property. 130 */ 131 DN getBaseDN(); 132 133 134 135 /** 136 * Gets the "changetime-heartbeat-interval" property. 137 * <p> 138 * Specifies the heart-beat interval that the directory server will 139 * use when sending its local change time to the Replication Server. 140 * <p> 141 * The directory server sends a regular heart-beat to the 142 * Replication within the specified interval. The heart-beat 143 * indicates the change time of the directory server to the 144 * Replication Server. 145 * 146 * @return Returns the value of the "changetime-heartbeat-interval" property. 147 */ 148 long getChangetimeHeartbeatInterval(); 149 150 151 152 /** 153 * Gets the "conflicts-historical-purge-delay" property. 154 * <p> 155 * This delay indicates the time (in minutes) the domain keeps the 156 * historical information necessary to solve conflicts.When a change 157 * stored in the historical part of the user entry has a date (from 158 * its replication ChangeNumber) older than this delay, it is 159 * candidate to be purged. The purge is applied on 2 events: modify 160 * of the entry, dedicated purge task. 161 * 162 * @return Returns the value of the "conflicts-historical-purge-delay" property. 163 */ 164 long getConflictsHistoricalPurgeDelay(); 165 166 167 168 /** 169 * Gets the "fractional-exclude" property. 170 * <p> 171 * Allows to exclude some attributes to replicate to this server. 172 * <p> 173 * If fractional-exclude configuration attribute is used, attributes 174 * specified in this attribute will be ignored (not 175 * added/modified/deleted) when an operation performed from another 176 * directory server is being replayed in the local server. Note that 177 * the usage of this configuration attribute is mutually exclusive 178 * with the usage of the fractional-include attribute. 179 * 180 * @return Returns an unmodifiable set containing the values of the "fractional-exclude" property. 181 */ 182 SortedSet<String> getFractionalExclude(); 183 184 185 186 /** 187 * Gets the "fractional-include" property. 188 * <p> 189 * Allows to include some attributes to replicate to this server. 190 * <p> 191 * If fractional-include configuration attribute is used, only 192 * attributes specified in this attribute will be 193 * added/modified/deleted when an operation performed from another 194 * directory server is being replayed in the local server. Note that 195 * the usage of this configuration attribute is mutually exclusive 196 * with the usage of the fractional-exclude attribute. 197 * 198 * @return Returns an unmodifiable set containing the values of the "fractional-include" property. 199 */ 200 SortedSet<String> getFractionalInclude(); 201 202 203 204 /** 205 * Gets the "group-id" property. 206 * <p> 207 * The group ID associated with this replicated domain. 208 * <p> 209 * This value defines the group ID of the replicated domain. The 210 * replication system will preferably connect and send updates to 211 * replicate to a replication server with the same group ID as its 212 * own one (the local server group ID). 213 * 214 * @return Returns the value of the "group-id" property. 215 */ 216 int getGroupId(); 217 218 219 220 /** 221 * Gets the "heartbeat-interval" property. 222 * <p> 223 * Specifies the heart-beat interval that the directory server will 224 * use when communicating with Replication Servers. 225 * <p> 226 * The directory server expects a regular heart-beat coming from the 227 * Replication Server within the specified interval. If a heartbeat 228 * is not received within the interval, the Directory Server closes 229 * its connection and connects to another Replication Server. 230 * 231 * @return Returns the value of the "heartbeat-interval" property. 232 */ 233 long getHeartbeatInterval(); 234 235 236 237 /** 238 * Gets the "initialization-window-size" property. 239 * <p> 240 * Specifies the window size that this directory server may use when 241 * communicating with remote Directory Servers for initialization. 242 * 243 * @return Returns the value of the "initialization-window-size" property. 244 */ 245 int getInitializationWindowSize(); 246 247 248 249 /** 250 * Gets the "isolation-policy" property. 251 * <p> 252 * Specifies the behavior of the directory server if a write 253 * operation is attempted on the data within the Replication Domain 254 * when none of the configured Replication Servers are available. 255 * 256 * @return Returns the value of the "isolation-policy" property. 257 */ 258 IsolationPolicy getIsolationPolicy(); 259 260 261 262 /** 263 * Gets the "log-changenumber" property. 264 * <p> 265 * Indicates if this server logs the ChangeNumber in access log. 266 * <p> 267 * This boolean indicates if the domain should log the ChangeNumber 268 * of replicated operations in the access log. 269 * 270 * @return Returns the value of the "log-changenumber" property. 271 */ 272 boolean isLogChangenumber(); 273 274 275 276 /** 277 * Gets the "referrals-url" property. 278 * <p> 279 * The URLs other LDAP servers should use to refer to the local 280 * server. 281 * <p> 282 * URLs used by peer servers in the topology to refer to the local 283 * server through LDAP referrals. If this attribute is not defined, 284 * every URLs available to access this server will be used. If 285 * defined, only URLs specified here will be used. 286 * 287 * @return Returns an unmodifiable set containing the values of the "referrals-url" property. 288 */ 289 SortedSet<String> getReferralsUrl(); 290 291 292 293 /** 294 * Gets the "replication-server" property. 295 * <p> 296 * Specifies the addresses of the Replication Servers within the 297 * Replication Domain to which the directory server should try to 298 * connect at startup time. 299 * <p> 300 * Addresses must be specified using the syntax: hostname:port 301 * 302 * @return Returns an unmodifiable set containing the values of the "replication-server" property. 303 */ 304 SortedSet<String> getReplicationServer(); 305 306 307 308 /** 309 * Gets the "server-id" property. 310 * <p> 311 * Specifies a unique identifier for the directory server within the 312 * Replication Domain. 313 * <p> 314 * Each directory server within the same Replication Domain must 315 * have a different server ID. A directory server which is a member 316 * of multiple Replication Domains may use the same server ID for 317 * each of its Replication Domain configurations. 318 * 319 * @return Returns the value of the "server-id" property. 320 */ 321 int getServerId(); 322 323 324 325 /** 326 * Gets the "solve-conflicts" property. 327 * <p> 328 * Indicates if this server solves conflict. 329 * <p> 330 * This boolean indicates if this domain keeps the historical 331 * information necessary to solve conflicts. When set to false the 332 * server will not maintain historical information and will therefore 333 * not be able to solve conflict. This should therefore be done only 334 * if the replication is used in a single master type of deployment. 335 * 336 * @return Returns the value of the "solve-conflicts" property. 337 */ 338 boolean isSolveConflicts(); 339 340 341 342 /** 343 * Gets the "source-address" property. 344 * <p> 345 * If specified, the server will bind to the address before 346 * connecting to the remote server. 347 * <p> 348 * The address must be one assigned to an existing network 349 * interface. 350 * 351 * @return Returns the value of the "source-address" property. 352 */ 353 InetAddress getSourceAddress(); 354 355 356 357 /** 358 * Gets the "window-size" property. 359 * <p> 360 * Specifies the window size that the directory server will use when 361 * communicating with Replication Servers. 362 * <p> 363 * This option may be deprecated and removed in future releases. 364 * 365 * @return Returns the value of the "window-size" property. 366 */ 367 int getWindowSize(); 368 369 370 371 /** 372 * Gets the External Changelog Domain. 373 * 374 * @return Returns the External Changelog Domain. 375 * @throws ConfigException 376 * If the External Changelog Domain could not be found or it could not 377 * be successfully decoded. 378 */ 379 ExternalChangelogDomainCfg getExternalChangelogDomain() throws ConfigException; 380 381}