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.opends.server.admin.Configuration; 033import org.opends.server.admin.server.ConfigurationChangeListener; 034import org.opends.server.admin.std.meta.ReplicationServerCfgDefn.ReplicationDBImplementation; 035 036 037 038/** 039 * A server-side interface for querying Replication Server settings. 040 * <p> 041 * Replication Servers publish updates to Directory Servers within a 042 * Replication Domain. 043 */ 044public interface ReplicationServerCfg extends Configuration { 045 046 /** 047 * Gets the configuration class associated with this Replication Server. 048 * 049 * @return Returns the configuration class associated with this Replication Server. 050 */ 051 Class<? extends ReplicationServerCfg> configurationClass(); 052 053 054 055 /** 056 * Register to be notified when this Replication Server is changed. 057 * 058 * @param listener 059 * The Replication Server configuration change listener. 060 */ 061 void addChangeListener(ConfigurationChangeListener<ReplicationServerCfg> listener); 062 063 064 065 /** 066 * Deregister an existing Replication Server configuration change listener. 067 * 068 * @param listener 069 * The Replication Server configuration change listener. 070 */ 071 void removeChangeListener(ConfigurationChangeListener<ReplicationServerCfg> listener); 072 073 074 075 /** 076 * Gets the "assured-timeout" property. 077 * <p> 078 * The timeout value when waiting for assured mode acknowledgments. 079 * <p> 080 * Defines the number of milliseconds that the replication server 081 * will wait for assured acknowledgments (in either Safe Data or Safe 082 * Read assured sub modes) before forgetting them and answer to the 083 * entity that sent an update and is waiting for acknowledgment. 084 * 085 * @return Returns the value of the "assured-timeout" property. 086 */ 087 long getAssuredTimeout(); 088 089 090 091 /** 092 * Gets the "compute-change-number" property. 093 * <p> 094 * Whether the replication server will compute change numbers. 095 * <p> 096 * This boolean tells the replication server to compute change 097 * numbers for each replicated change by maintaining a change number 098 * index database. Changenumbers are computed according to 099 * http://tools.ietf.org/html/draft-good-ldap-changelog-04. Note this 100 * functionality has an impact on CPU, disk accesses and storage. If 101 * changenumbers are not required, it is advisable to set this value 102 * to false. 103 * 104 * @return Returns the value of the "compute-change-number" property. 105 */ 106 boolean isComputeChangeNumber(); 107 108 109 110 /** 111 * Gets the "degraded-status-threshold" property. 112 * <p> 113 * The number of pending changes as threshold value for putting a 114 * directory server in degraded status. 115 * <p> 116 * This value represents a number of pending changes a replication 117 * server has in queue for sending to a directory server. Once this 118 * value is crossed, the matching directory server goes in degraded 119 * status. When number of pending changes goes back under this value, 120 * the directory server is put back in normal status. 0 means status 121 * analyzer is disabled and directory servers are never put in 122 * degraded status. 123 * 124 * @return Returns the value of the "degraded-status-threshold" property. 125 */ 126 int getDegradedStatusThreshold(); 127 128 129 130 /** 131 * Gets the "group-id" property. 132 * <p> 133 * The group id for the replication server. 134 * <p> 135 * This value defines the group id of the replication server. The 136 * replication system of a LDAP server uses the group id of the 137 * replicated domain and tries to connect, if possible, to a 138 * replication with the same group id. 139 * 140 * @return Returns the value of the "group-id" property. 141 */ 142 int getGroupId(); 143 144 145 146 /** 147 * Gets the "monitoring-period" property. 148 * <p> 149 * The period between sending of monitoring messages. 150 * <p> 151 * Defines the duration that the replication server will wait before 152 * sending new monitoring messages to its peers (replication servers 153 * and directory servers). Larger values increase the length of time 154 * it takes for a directory server to detect and switch to a more 155 * suitable replication server, whereas smaller values increase the 156 * amount of background network traffic. 157 * 158 * @return Returns the value of the "monitoring-period" property. 159 */ 160 long getMonitoringPeriod(); 161 162 163 164 /** 165 * Gets the "queue-size" property. 166 * <p> 167 * Specifies the number of changes that are kept in memory for each 168 * directory server in the Replication Domain. 169 * 170 * @return Returns the value of the "queue-size" property. 171 */ 172 int getQueueSize(); 173 174 175 176 /** 177 * Gets the "replication-db-directory" property. 178 * <p> 179 * The path where the Replication Server stores all persistent 180 * information. 181 * 182 * @return Returns the value of the "replication-db-directory" property. 183 */ 184 String getReplicationDBDirectory(); 185 186 187 188 /** 189 * Gets the "replication-db-implementation" property. 190 * <p> 191 * The Replication Server database implementation that stores all 192 * persistent information. 193 * 194 * @return Returns the value of the "replication-db-implementation" property. 195 */ 196 ReplicationDBImplementation getReplicationDBImplementation(); 197 198 199 200 /** 201 * Gets the "replication-port" property. 202 * <p> 203 * The port on which this Replication Server waits for connections 204 * from other Replication Servers or Directory Servers. 205 * 206 * @return Returns the value of the "replication-port" property. 207 */ 208 int getReplicationPort(); 209 210 211 212 /** 213 * Gets the "replication-purge-delay" property. 214 * <p> 215 * The time (in seconds) after which the Replication Server erases 216 * all persistent information. 217 * 218 * @return Returns the value of the "replication-purge-delay" property. 219 */ 220 long getReplicationPurgeDelay(); 221 222 223 224 /** 225 * Gets the "replication-server" property. 226 * <p> 227 * Specifies the addresses of other Replication Servers to which 228 * this Replication Server tries to connect at startup time. 229 * <p> 230 * Addresses must be specified using the syntax: "hostname:port". If 231 * IPv6 addresses are used as the hostname, they must be specified 232 * using the syntax "[IPv6Address]:port". 233 * 234 * @return Returns an unmodifiable set containing the values of the "replication-server" property. 235 */ 236 SortedSet<String> getReplicationServer(); 237 238 239 240 /** 241 * Gets the "replication-server-id" property. 242 * <p> 243 * Specifies a unique identifier for the Replication Server. 244 * <p> 245 * Each Replication Server must have a different server ID. 246 * 247 * @return Returns the value of the "replication-server-id" property. 248 */ 249 int getReplicationServerId(); 250 251 252 253 /** 254 * Gets the "source-address" property. 255 * <p> 256 * If specified, the server will bind to the address before 257 * connecting to the remote server. 258 * <p> 259 * The address must be one assigned to an existing network 260 * interface. 261 * 262 * @return Returns the value of the "source-address" property. 263 */ 264 InetAddress getSourceAddress(); 265 266 267 268 /** 269 * Gets the "weight" property. 270 * <p> 271 * The weight of the replication server. 272 * <p> 273 * The weight affected to the replication server. Each replication 274 * server of the topology has a weight. When combined together, the 275 * weights of the replication servers of a same group can be 276 * translated to a percentage that determines the quantity of 277 * directory servers of the topology that should be connected to a 278 * replication server. For instance imagine a topology with 3 279 * replication servers (with the same group id) with the following 280 * weights: RS1=1, RS2=1, RS3=2. This means that RS1 should have 25% 281 * of the directory servers connected in the topology, RS2 25%, and 282 * RS3 50%. This may be useful if the replication servers of the 283 * topology have a different power and one wants to spread the load 284 * between the replication servers according to their power. 285 * 286 * @return Returns the value of the "weight" property. 287 */ 288 int getWeight(); 289 290 291 292 /** 293 * Gets the "window-size" property. 294 * <p> 295 * Specifies the window size that the Replication Server uses when 296 * communicating with other Replication Servers. 297 * <p> 298 * This option may be deprecated and removed in future releases. 299 * 300 * @return Returns the value of the "window-size" property. 301 */ 302 int getWindowSize(); 303 304}