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