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.meta.ReplicationDomainCfgDefn.IsolationPolicy; 038 import org.opends.server.admin.std.server.ReplicationDomainCfg; 039 import org.opends.server.types.DN; 040 041 042 043 /** 044 * A client-side interface for reading and modifying Replication 045 * Domain settings. 046 * <p> 047 * A Replication Domain comprises of several Directory Servers sharing 048 * the same synchronized set of data. 049 */ 050 public interface ReplicationDomainCfgClient extends ConfigurationClient { 051 052 /** 053 * Get the configuration definition associated with this Replication Domain. 054 * 055 * @return Returns the configuration definition associated with this Replication Domain. 056 */ 057 ManagedObjectDefinition<? extends ReplicationDomainCfgClient, ? extends ReplicationDomainCfg> definition(); 058 059 060 061 /** 062 * Gets the "base-dn" property. 063 * <p> 064 * Specifies the base DN of the replicated data. 065 * 066 * @return Returns the value of the "base-dn" property. 067 */ 068 DN getBaseDN(); 069 070 071 072 /** 073 * Sets the "base-dn" property. 074 * <p> 075 * Specifies the base DN of the replicated data. 076 * <p> 077 * This property is read-only and can only be modified during 078 * creation of a Replication Domain. 079 * 080 * @param value The value of the "base-dn" property. 081 * @throws IllegalPropertyValueException 082 * If the new value is invalid. 083 * @throws PropertyIsReadOnlyException 084 * If this Replication Domain is not being initialized. 085 */ 086 void setBaseDN(DN value) throws IllegalPropertyValueException, PropertyIsReadOnlyException; 087 088 089 090 /** 091 * Gets the "heartbeat-interval" property. 092 * <p> 093 * Specifies the heart-beat interval that the Directory Server will 094 * use when communicating with Replication Servers. 095 * <p> 096 * The Directory Server expects a regular heart-beat coming from the 097 * Replication Server within the specified interval. If a heartbeat 098 * is not received within the interval, the Directory Server closes 099 * its connection and connects to another Replication Server. 100 * 101 * @return Returns the value of the "heartbeat-interval" property. 102 */ 103 long getHeartbeatInterval(); 104 105 106 107 /** 108 * Sets the "heartbeat-interval" property. 109 * <p> 110 * Specifies the heart-beat interval that the Directory Server will 111 * use when communicating with Replication Servers. 112 * <p> 113 * The Directory Server expects a regular heart-beat coming from the 114 * Replication Server within the specified interval. If a heartbeat 115 * is not received within the interval, the Directory Server closes 116 * its connection and connects to another Replication Server. 117 * 118 * @param value The value of the "heartbeat-interval" property. 119 * @throws IllegalPropertyValueException 120 * If the new value is invalid. 121 */ 122 void setHeartbeatInterval(Long value) throws IllegalPropertyValueException; 123 124 125 126 /** 127 * Gets the "isolation-policy" property. 128 * <p> 129 * Specifies the behavior of the Directory Server if a write 130 * operation is attempted on the data within the Replication Domain 131 * when none of the configured Replication Servers are available. 132 * 133 * @return Returns the value of the "isolation-policy" property. 134 */ 135 IsolationPolicy getIsolationPolicy(); 136 137 138 139 /** 140 * Sets the "isolation-policy" property. 141 * <p> 142 * Specifies the behavior of the Directory Server if a write 143 * operation is attempted on the data within the Replication Domain 144 * when none of the configured Replication Servers are available. 145 * 146 * @param value The value of the "isolation-policy" property. 147 * @throws IllegalPropertyValueException 148 * If the new value is invalid. 149 */ 150 void setIsolationPolicy(IsolationPolicy value) throws IllegalPropertyValueException; 151 152 153 154 /** 155 * Gets the "replication-server" property. 156 * <p> 157 * Specifies the addresses of the Replication Servers within the 158 * Replication Domain to which the Directory Server should try to 159 * connect at startup time. 160 * <p> 161 * Addresses must be specified using the syntax: hostname:port 162 * 163 * @return Returns the values of the "replication-server" property. 164 */ 165 SortedSet<String> getReplicationServer(); 166 167 168 169 /** 170 * Sets the "replication-server" property. 171 * <p> 172 * Specifies the addresses of the Replication Servers within the 173 * Replication Domain to which the Directory Server should try to 174 * connect at startup time. 175 * <p> 176 * Addresses must be specified using the syntax: hostname:port 177 * 178 * @param values The values of the "replication-server" property. 179 * @throws IllegalPropertyValueException 180 * If one or more of the new values are invalid. 181 */ 182 void setReplicationServer(Collection<String> values) throws IllegalPropertyValueException; 183 184 185 186 /** 187 * Gets the "server-id" property. 188 * <p> 189 * Specifies a unique identifier for the Directory Server within the 190 * Replication Domain. 191 * <p> 192 * Each Directory Server within the same Replication Domain must 193 * have a different server ID. A Directory Server which is a member 194 * of multiple Replication Domains may use the same server ID for 195 * each of its Replication Domain configurations. 196 * 197 * @return Returns the value of the "server-id" property. 198 */ 199 Integer getServerId(); 200 201 202 203 /** 204 * Sets the "server-id" property. 205 * <p> 206 * Specifies a unique identifier for the Directory Server within the 207 * Replication Domain. 208 * <p> 209 * Each Directory Server within the same Replication Domain must 210 * have a different server ID. A Directory Server which is a member 211 * of multiple Replication Domains may use the same server ID for 212 * each of its Replication Domain configurations. 213 * <p> 214 * This property is read-only and can only be modified during 215 * creation of a Replication Domain. 216 * 217 * @param value The value of the "server-id" property. 218 * @throws IllegalPropertyValueException 219 * If the new value is invalid. 220 * @throws PropertyIsReadOnlyException 221 * If this Replication Domain is not being initialized. 222 */ 223 void setServerId(int value) throws IllegalPropertyValueException, PropertyIsReadOnlyException; 224 225 226 227 /** 228 * Gets the "window-size" property. 229 * <p> 230 * Specifies the window size that the Directory Server will use when 231 * communicating with Replication Servers. 232 * 233 * @return Returns the value of the "window-size" property. 234 */ 235 int getWindowSize(); 236 237 238 239 /** 240 * Sets the "window-size" property. 241 * <p> 242 * Specifies the window size that the Directory Server will use when 243 * communicating with Replication Servers. 244 * 245 * @param value The value of the "window-size" property. 246 * @throws IllegalPropertyValueException 247 * If the new value is invalid. 248 */ 249 void setWindowSize(Integer value) throws IllegalPropertyValueException; 250 251 }