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.server.ConfigurationChangeListener;
033 import org.opends.server.admin.std.meta.FileSystemEntryCacheCfgDefn.CacheType;
034
035
036
037 /**
038 * A server-side interface for querying File System Entry Cache
039 * settings.
040 * <p>
041 * The File System Entry Cache is an entry cache implementation which
042 * uses a JE database to keep track of the entries.
043 */
044 public interface FileSystemEntryCacheCfg extends EntryCacheCfg {
045
046 /**
047 * Gets the configuration class associated with this File System Entry Cache.
048 *
049 * @return Returns the configuration class associated with this File System Entry Cache.
050 */
051 Class<? extends FileSystemEntryCacheCfg> configurationClass();
052
053
054
055 /**
056 * Register to be notified when this File System Entry Cache is changed.
057 *
058 * @param listener
059 * The File System Entry Cache configuration change listener.
060 */
061 void addFileSystemChangeListener(ConfigurationChangeListener<FileSystemEntryCacheCfg> listener);
062
063
064
065 /**
066 * Deregister an existing File System Entry Cache configuration change listener.
067 *
068 * @param listener
069 * The File System Entry Cache configuration change listener.
070 */
071 void removeFileSystemChangeListener(ConfigurationChangeListener<FileSystemEntryCacheCfg> listener);
072
073
074
075 /**
076 * Gets the "cache-directory" property.
077 * <p>
078 * Specifies the directory in which the JE environment should store
079 * the cache.
080 *
081 * @return Returns the value of the "cache-directory" property.
082 */
083 String getCacheDirectory();
084
085
086
087 /**
088 * Gets the "cache-type" property.
089 * <p>
090 * Specifies the policy which should be used for purging entries
091 * from the cache.
092 *
093 * @return Returns the value of the "cache-type" property.
094 */
095 CacheType getCacheType();
096
097
098
099 /**
100 * Gets the "compact-encoding" property.
101 * <p>
102 * Indicates whether the cache should use a compact form when
103 * encoding cache entries by compressing the attribute descriptions
104 * and object class sets.
105 * <p>
106 * Note that compression does not preserve user-supplied
107 * capitalization in the object class and attribute type names.
108 *
109 * @return Returns the value of the "compact-encoding" property.
110 */
111 boolean isCompactEncoding();
112
113
114
115 /**
116 * Gets the "db-cache-percent" property.
117 * <p>
118 * Specifies the maximum memory usage for the internal JE cache as a
119 * percentage of the total JVM memory.
120 *
121 * @return Returns the value of the "db-cache-percent" property.
122 */
123 int getDBCachePercent();
124
125
126
127 /**
128 * Gets the "db-cache-size" property.
129 * <p>
130 * Specifies the maximum JVM memory usage in bytes for the internal
131 * JE cache.
132 *
133 * @return Returns the value of the "db-cache-size" property.
134 */
135 long getDBCacheSize();
136
137
138
139 /**
140 * Gets the "exclude-filter" property.
141 * <p>
142 * The set of filters that define the entries that should be
143 * excluded from the cache.
144 *
145 * @return Returns an unmodifiable set containing the values of the "exclude-filter" property.
146 */
147 SortedSet<String> getExcludeFilter();
148
149
150
151 /**
152 * Gets the "include-filter" property.
153 * <p>
154 * The set of filters that define the entries that should be
155 * included in the cache.
156 *
157 * @return Returns an unmodifiable set containing the values of the "include-filter" property.
158 */
159 SortedSet<String> getIncludeFilter();
160
161
162
163 /**
164 * Gets the "java-class" property.
165 * <p>
166 * Specifies the fully-qualified name of the Java class that
167 * provides the File System Entry Cache implementation.
168 *
169 * @return Returns the value of the "java-class" property.
170 */
171 String getJavaClass();
172
173
174
175 /**
176 * Gets the "je-property" property.
177 * <p>
178 * Specifies the environment properties for the Berkeley DB Java
179 * Edition database providing the backend for this entry cache.
180 * <p>
181 * Any Berkeley DB Java Edition property can be specified using the
182 * following form: property-name=property-value. Refer to the OpenDS
183 * documentation for further information on related properties, their
184 * implications and range values. The definitive identification of
185 * all the property parameters available in the example.properties
186 * file in the Berkeley DB Java Edition distribution.
187 *
188 * @return Returns an unmodifiable set containing the values of the "je-property" property.
189 */
190 SortedSet<String> getJEProperty();
191
192
193
194 /**
195 * Gets the "lock-timeout" property.
196 * <p>
197 * The length of time to wait while attempting to acquire a read or
198 * write lock.
199 *
200 * @return Returns the value of the "lock-timeout" property.
201 */
202 long getLockTimeout();
203
204
205
206 /**
207 * Gets the "max-entries" property.
208 * <p>
209 * The maximum number of entries allowed in the cache.
210 *
211 * @return Returns the value of the "max-entries" property.
212 */
213 int getMaxEntries();
214
215
216
217 /**
218 * Gets the "max-memory-size" property.
219 * <p>
220 * The maximum size of the entry cache in bytes.
221 *
222 * @return Returns the value of the "max-memory-size" property.
223 */
224 long getMaxMemorySize();
225
226
227
228 /**
229 * Gets the "persistent-cache" property.
230 * <p>
231 * Specifies whether the cache should persist across restarts.
232 *
233 * @return Returns the value of the "persistent-cache" property.
234 */
235 boolean isPersistentCache();
236
237 }