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