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 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.admin.std.client; 028 029 030 031 import java.util.Collection; 032 import java.util.SortedSet; 033 import org.opends.server.admin.ConfigurationClient; 034 import org.opends.server.admin.IllegalPropertyValueException; 035 import org.opends.server.admin.ManagedObjectDefinition; 036 import org.opends.server.admin.PropertyIsReadOnlyException; 037 import org.opends.server.admin.std.server.ReplicationServerCfg; 038 039 040 041 /** 042 * A client-side interface for reading and modifying Replication 043 * Server settings. 044 * <p> 045 * Replication Servers publish updates to Directory Servers within a 046 * Replication Domain. 047 */ 048 public interface ReplicationServerCfgClient extends ConfigurationClient { 049 050 /** 051 * Get the configuration definition associated with this Replication Server. 052 * 053 * @return Returns the configuration definition associated with this Replication Server. 054 */ 055 ManagedObjectDefinition<? extends ReplicationServerCfgClient, ? extends ReplicationServerCfg> definition(); 056 057 058 059 /** 060 * Gets the "queue-size" property. 061 * <p> 062 * Specifies the number of changes that are kept in memory for each 063 * Directory Server in the Replication Domain. 064 * 065 * @return Returns the value of the "queue-size" property. 066 */ 067 int getQueueSize(); 068 069 070 071 /** 072 * Sets the "queue-size" property. 073 * <p> 074 * Specifies the number of changes that are kept in memory for each 075 * Directory Server in the Replication Domain. 076 * 077 * @param value The value of the "queue-size" property. 078 * @throws IllegalPropertyValueException 079 * If the new value is invalid. 080 */ 081 void setQueueSize(Integer value) throws IllegalPropertyValueException; 082 083 084 085 /** 086 * Gets the "replication-db-directory" property. 087 * <p> 088 * The path where the Replication Server stores all persistent 089 * information. 090 * 091 * @return Returns the value of the "replication-db-directory" property. 092 */ 093 String getReplicationDBDirectory(); 094 095 096 097 /** 098 * Sets the "replication-db-directory" property. 099 * <p> 100 * The path where the Replication Server stores all persistent 101 * information. 102 * <p> 103 * This property is read-only and can only be modified during 104 * creation of a Replication Server. 105 * 106 * @param value The value of the "replication-db-directory" property. 107 * @throws IllegalPropertyValueException 108 * If the new value is invalid. 109 * @throws PropertyIsReadOnlyException 110 * If this Replication Server is not being initialized. 111 */ 112 void setReplicationDBDirectory(String value) throws IllegalPropertyValueException, PropertyIsReadOnlyException; 113 114 115 116 /** 117 * Gets the "replication-port" property. 118 * <p> 119 * The port on which this Replication Server waits for connections 120 * from other Replication Servers or Directory Servers. 121 * 122 * @return Returns the value of the "replication-port" property. 123 */ 124 Integer getReplicationPort(); 125 126 127 128 /** 129 * Sets the "replication-port" property. 130 * <p> 131 * The port on which this Replication Server waits for connections 132 * from other Replication Servers or Directory Servers. 133 * 134 * @param value The value of the "replication-port" property. 135 * @throws IllegalPropertyValueException 136 * If the new value is invalid. 137 */ 138 void setReplicationPort(int value) throws IllegalPropertyValueException; 139 140 141 142 /** 143 * Gets the "replication-purge-delay" property. 144 * <p> 145 * The time (in seconds) after which the Replication Server erases 146 * all persistent information. 147 * 148 * @return Returns the value of the "replication-purge-delay" property. 149 */ 150 long getReplicationPurgeDelay(); 151 152 153 154 /** 155 * Sets the "replication-purge-delay" property. 156 * <p> 157 * The time (in seconds) after which the Replication Server erases 158 * all persistent information. 159 * 160 * @param value The value of the "replication-purge-delay" property. 161 * @throws IllegalPropertyValueException 162 * If the new value is invalid. 163 */ 164 void setReplicationPurgeDelay(Long value) throws IllegalPropertyValueException; 165 166 167 168 /** 169 * Gets the "replication-server" property. 170 * <p> 171 * Specifies the addresses of other Replication Servers to which 172 * this Replication Server tries to connect at startup time. 173 * <p> 174 * Addresses must be specified using the syntax: hostname:port 175 * 176 * @return Returns the values of the "replication-server" property. 177 */ 178 SortedSet<String> getReplicationServer(); 179 180 181 182 /** 183 * Sets the "replication-server" property. 184 * <p> 185 * Specifies the addresses of other Replication Servers to which 186 * this Replication Server tries to connect at startup time. 187 * <p> 188 * Addresses must be specified using the syntax: hostname:port 189 * 190 * @param values The values of the "replication-server" property. 191 * @throws IllegalPropertyValueException 192 * If one or more of the new values are invalid. 193 */ 194 void setReplicationServer(Collection<String> values) throws IllegalPropertyValueException; 195 196 197 198 /** 199 * Gets the "replication-server-id" property. 200 * <p> 201 * Specifies a unique identifier for the Replication Server. 202 * <p> 203 * Each Replication Server must have a different server ID. 204 * 205 * @return Returns the value of the "replication-server-id" property. 206 */ 207 Integer getReplicationServerId(); 208 209 210 211 /** 212 * Sets the "replication-server-id" property. 213 * <p> 214 * Specifies a unique identifier for the Replication Server. 215 * <p> 216 * Each Replication Server must have a different server ID. 217 * <p> 218 * This property is read-only and can only be modified during 219 * creation of a Replication Server. 220 * 221 * @param value The value of the "replication-server-id" property. 222 * @throws IllegalPropertyValueException 223 * If the new value is invalid. 224 * @throws PropertyIsReadOnlyException 225 * If this Replication Server is not being initialized. 226 */ 227 void setReplicationServerId(int value) throws IllegalPropertyValueException, PropertyIsReadOnlyException; 228 229 230 231 /** 232 * Gets the "window-size" property. 233 * <p> 234 * Specifies the window size that the Replication Server uses when 235 * communicating with other Replication Servers. 236 * 237 * @return Returns the value of the "window-size" property. 238 */ 239 int getWindowSize(); 240 241 242 243 /** 244 * Sets the "window-size" property. 245 * <p> 246 * Specifies the window size that the Replication Server uses when 247 * communicating with other Replication Servers. 248 * 249 * @param value The value of the "window-size" property. 250 * @throws IllegalPropertyValueException 251 * If the new value is invalid. 252 */ 253 void setWindowSize(Integer value) throws IllegalPropertyValueException; 254 255 }