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.server; 028 029 030 031 import java.util.SortedSet; 032 import org.opends.server.admin.Configuration; 033 import org.opends.server.admin.server.ConfigurationChangeListener; 034 035 036 037 /** 038 * A server-side interface for querying Replication Server settings. 039 * <p> 040 * Replication Servers publish updates to Directory Servers within a 041 * Replication Domain. 042 */ 043 public interface ReplicationServerCfg extends Configuration { 044 045 /** 046 * Gets the configuration class associated with this Replication Server. 047 * 048 * @return Returns the configuration class associated with this Replication Server. 049 */ 050 Class<? extends ReplicationServerCfg> configurationClass(); 051 052 053 054 /** 055 * Register to be notified when this Replication Server is changed. 056 * 057 * @param listener 058 * The Replication Server configuration change listener. 059 */ 060 void addChangeListener(ConfigurationChangeListener<ReplicationServerCfg> listener); 061 062 063 064 /** 065 * Deregister an existing Replication Server configuration change listener. 066 * 067 * @param listener 068 * The Replication Server configuration change listener. 069 */ 070 void removeChangeListener(ConfigurationChangeListener<ReplicationServerCfg> listener); 071 072 073 074 /** 075 * Gets the "queue-size" property. 076 * <p> 077 * Specifies the number of changes that are kept in memory for each 078 * Directory Server in the Replication Domain. 079 * 080 * @return Returns the value of the "queue-size" property. 081 */ 082 int getQueueSize(); 083 084 085 086 /** 087 * Gets the "replication-db-directory" property. 088 * <p> 089 * The path where the Replication Server stores all persistent 090 * information. 091 * 092 * @return Returns the value of the "replication-db-directory" property. 093 */ 094 String getReplicationDBDirectory(); 095 096 097 098 /** 099 * Gets the "replication-port" property. 100 * <p> 101 * The port on which this Replication Server waits for connections 102 * from other Replication Servers or Directory Servers. 103 * 104 * @return Returns the value of the "replication-port" property. 105 */ 106 int getReplicationPort(); 107 108 109 110 /** 111 * Gets the "replication-purge-delay" property. 112 * <p> 113 * The time (in seconds) after which the Replication Server erases 114 * all persistent information. 115 * 116 * @return Returns the value of the "replication-purge-delay" property. 117 */ 118 long getReplicationPurgeDelay(); 119 120 121 122 /** 123 * Gets the "replication-server" property. 124 * <p> 125 * Specifies the addresses of other Replication Servers to which 126 * this Replication Server tries to connect at startup time. 127 * <p> 128 * Addresses must be specified using the syntax: hostname:port 129 * 130 * @return Returns an unmodifiable set containing the values of the "replication-server" property. 131 */ 132 SortedSet<String> getReplicationServer(); 133 134 135 136 /** 137 * Gets the "replication-server-id" property. 138 * <p> 139 * Specifies a unique identifier for the Replication Server. 140 * <p> 141 * Each Replication Server must have a different server ID. 142 * 143 * @return Returns the value of the "replication-server-id" property. 144 */ 145 int getReplicationServerId(); 146 147 148 149 /** 150 * Gets the "window-size" property. 151 * <p> 152 * Specifies the window size that the Replication Server uses when 153 * communicating with other Replication Servers. 154 * 155 * @return Returns the value of the "window-size" property. 156 */ 157 int getWindowSize(); 158 159 }