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.IllegalPropertyValueException;
034 import org.opends.server.admin.ManagedObjectDefinition;
035 import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
036
037
038
039 /**
040 * A client-side interface for reading and modifying FIFO Entry Cache
041 * settings.
042 * <p>
043 * FIFO Entry Caches use a FIFO queue to keep track of the cached
044 * entries.
045 */
046 public interface FIFOEntryCacheCfgClient extends EntryCacheCfgClient {
047
048 /**
049 * Get the configuration definition associated with this FIFO Entry Cache.
050 *
051 * @return Returns the configuration definition associated with this FIFO Entry Cache.
052 */
053 ManagedObjectDefinition<? extends FIFOEntryCacheCfgClient, ? extends FIFOEntryCacheCfg> definition();
054
055
056
057 /**
058 * Gets the "exclude-filter" property.
059 * <p>
060 * The set of filters that define the entries that should be
061 * excluded from the cache.
062 *
063 * @return Returns the values of the "exclude-filter" property.
064 */
065 SortedSet<String> getExcludeFilter();
066
067
068
069 /**
070 * Sets the "exclude-filter" property.
071 * <p>
072 * The set of filters that define the entries that should be
073 * excluded from the cache.
074 *
075 * @param values The values of the "exclude-filter" property.
076 * @throws IllegalPropertyValueException
077 * If one or more of the new values are invalid.
078 */
079 void setExcludeFilter(Collection<String> values) throws IllegalPropertyValueException;
080
081
082
083 /**
084 * Gets the "include-filter" property.
085 * <p>
086 * The set of filters that define the entries that should be
087 * included in the cache.
088 *
089 * @return Returns the values of the "include-filter" property.
090 */
091 SortedSet<String> getIncludeFilter();
092
093
094
095 /**
096 * Sets the "include-filter" property.
097 * <p>
098 * The set of filters that define the entries that should be
099 * included in the cache.
100 *
101 * @param values The values of the "include-filter" property.
102 * @throws IllegalPropertyValueException
103 * If one or more of the new values are invalid.
104 */
105 void setIncludeFilter(Collection<String> values) throws IllegalPropertyValueException;
106
107
108
109 /**
110 * Gets the "java-class" property.
111 * <p>
112 * Specifies the fully-qualified name of the Java class that
113 * provides the FIFO Entry Cache implementation.
114 *
115 * @return Returns the value of the "java-class" property.
116 */
117 String getJavaClass();
118
119
120
121 /**
122 * Sets the "java-class" property.
123 * <p>
124 * Specifies the fully-qualified name of the Java class that
125 * provides the FIFO Entry Cache implementation.
126 *
127 * @param value The value of the "java-class" property.
128 * @throws IllegalPropertyValueException
129 * If the new value is invalid.
130 */
131 void setJavaClass(String value) throws IllegalPropertyValueException;
132
133
134
135 /**
136 * Gets the "lock-timeout" property.
137 * <p>
138 * Specifies the length of time to wait while attempting to acquire
139 * a read or write lock.
140 *
141 * @return Returns the value of the "lock-timeout" property.
142 */
143 long getLockTimeout();
144
145
146
147 /**
148 * Sets the "lock-timeout" property.
149 * <p>
150 * Specifies the length of time to wait while attempting to acquire
151 * a read or write lock.
152 *
153 * @param value The value of the "lock-timeout" property.
154 * @throws IllegalPropertyValueException
155 * If the new value is invalid.
156 */
157 void setLockTimeout(Long value) throws IllegalPropertyValueException;
158
159
160
161 /**
162 * Gets the "max-entries" property.
163 * <p>
164 * Specifies the maximum number of entries that we will allow in the
165 * cache.
166 *
167 * @return Returns the value of the "max-entries" property.
168 */
169 int getMaxEntries();
170
171
172
173 /**
174 * Sets the "max-entries" property.
175 * <p>
176 * Specifies the maximum number of entries that we will allow in the
177 * cache.
178 *
179 * @param value The value of the "max-entries" property.
180 * @throws IllegalPropertyValueException
181 * If the new value is invalid.
182 */
183 void setMaxEntries(Integer value) throws IllegalPropertyValueException;
184
185
186
187 /**
188 * Gets the "max-memory-percent" property.
189 * <p>
190 * Specifies the maximum memory usage for the entry cache as a
191 * percentage of the total JVM memory.
192 *
193 * @return Returns the value of the "max-memory-percent" property.
194 */
195 int getMaxMemoryPercent();
196
197
198
199 /**
200 * Sets the "max-memory-percent" property.
201 * <p>
202 * Specifies the maximum memory usage for the entry cache as a
203 * percentage of the total JVM memory.
204 *
205 * @param value The value of the "max-memory-percent" property.
206 * @throws IllegalPropertyValueException
207 * If the new value is invalid.
208 */
209 void setMaxMemoryPercent(Integer value) throws IllegalPropertyValueException;
210
211 }