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 legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ManagedObjectDefinition;
033import org.opends.server.admin.PropertyException;
034import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
035
036
037
038/**
039 * A client-side interface for reading and modifying FIFO Entry Cache
040 * settings.
041 * <p>
042 * FIFO Entry Caches use a FIFO queue to keep track of the cached
043 * entries.
044 */
045public interface FIFOEntryCacheCfgClient extends EntryCacheCfgClient {
046
047  /**
048   * Get the configuration definition associated with this FIFO Entry Cache.
049   *
050   * @return Returns the configuration definition associated with this FIFO Entry Cache.
051   */
052  ManagedObjectDefinition<? extends FIFOEntryCacheCfgClient, ? extends FIFOEntryCacheCfg> definition();
053
054
055
056  /**
057   * Gets the "exclude-filter" property.
058   * <p>
059   * The set of filters that define the entries that should be
060   * excluded from the cache.
061   *
062   * @return Returns the values of the "exclude-filter" property.
063   */
064  SortedSet<String> getExcludeFilter();
065
066
067
068  /**
069   * Sets the "exclude-filter" property.
070   * <p>
071   * The set of filters that define the entries that should be
072   * excluded from the cache.
073   *
074   * @param values The values of the "exclude-filter" property.
075   * @throws PropertyException
076   *           If one or more of the new values are invalid.
077   */
078  void setExcludeFilter(Collection<String> values) throws PropertyException;
079
080
081
082  /**
083   * Gets the "include-filter" property.
084   * <p>
085   * The set of filters that define the entries that should be
086   * included in the cache.
087   *
088   * @return Returns the values of the "include-filter" property.
089   */
090  SortedSet<String> getIncludeFilter();
091
092
093
094  /**
095   * Sets the "include-filter" property.
096   * <p>
097   * The set of filters that define the entries that should be
098   * included in the cache.
099   *
100   * @param values The values of the "include-filter" property.
101   * @throws PropertyException
102   *           If one or more of the new values are invalid.
103   */
104  void setIncludeFilter(Collection<String> values) throws PropertyException;
105
106
107
108  /**
109   * Gets the "java-class" property.
110   * <p>
111   * Specifies the fully-qualified name of the Java class that
112   * provides the FIFO Entry Cache implementation.
113   *
114   * @return Returns the value of the "java-class" property.
115   */
116  String getJavaClass();
117
118
119
120  /**
121   * Sets the "java-class" property.
122   * <p>
123   * Specifies the fully-qualified name of the Java class that
124   * provides the FIFO Entry Cache implementation.
125   *
126   * @param value The value of the "java-class" property.
127   * @throws PropertyException
128   *           If the new value is invalid.
129   */
130  void setJavaClass(String value) throws PropertyException;
131
132
133
134  /**
135   * Gets the "lock-timeout" property.
136   * <p>
137   * Specifies the length of time to wait while attempting to acquire
138   * a read or write lock.
139   *
140   * @return Returns the value of the "lock-timeout" property.
141   */
142  long getLockTimeout();
143
144
145
146  /**
147   * Sets the "lock-timeout" property.
148   * <p>
149   * Specifies the length of time to wait while attempting to acquire
150   * a read or write lock.
151   *
152   * @param value The value of the "lock-timeout" property.
153   * @throws PropertyException
154   *           If the new value is invalid.
155   */
156  void setLockTimeout(Long value) throws PropertyException;
157
158
159
160  /**
161   * Gets the "max-entries" property.
162   * <p>
163   * Specifies the maximum number of entries that we will allow in the
164   * cache.
165   *
166   * @return Returns the value of the "max-entries" property.
167   */
168  int getMaxEntries();
169
170
171
172  /**
173   * Sets the "max-entries" property.
174   * <p>
175   * Specifies the maximum number of entries that we will allow in the
176   * cache.
177   *
178   * @param value The value of the "max-entries" property.
179   * @throws PropertyException
180   *           If the new value is invalid.
181   */
182  void setMaxEntries(Integer value) throws PropertyException;
183
184
185
186  /**
187   * Gets the "max-memory-percent" property.
188   * <p>
189   * Specifies the maximum percentage of JVM memory used by the server
190   * before the entry caches stops caching and begins purging itself.
191   * <p>
192   * Very low settings such as 10 or 20 (percent) can prevent this
193   * entry cache from having enough space to hold any of the entries to
194   * cache, making it appear that the server is ignoring or skipping
195   * the entry cache entirely.
196   *
197   * @return Returns the value of the "max-memory-percent" property.
198   */
199  int getMaxMemoryPercent();
200
201
202
203  /**
204   * Sets the "max-memory-percent" property.
205   * <p>
206   * Specifies the maximum percentage of JVM memory used by the server
207   * before the entry caches stops caching and begins purging itself.
208   * <p>
209   * Very low settings such as 10 or 20 (percent) can prevent this
210   * entry cache from having enough space to hold any of the entries to
211   * cache, making it appear that the server is ignoring or skipping
212   * the entry cache entirely.
213   *
214   * @param value The value of the "max-memory-percent" property.
215   * @throws PropertyException
216   *           If the new value is invalid.
217   */
218  void setMaxMemoryPercent(Integer value) throws PropertyException;
219
220}