KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > runtime > BeanCacheDescriptor


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * @(#) BeanCache.java
26  *
27  * Copyright 2000-2001 by iPlanet/Sun Microsystems, Inc.,
28  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
29  * All rights reserved.
30  *
31  * This software is the confidential and proprietary information
32  * of iPlanet/Sun Microsystems, Inc. ("Confidential Information").
33  * You shall not disclose such Confidential Information and shall
34  * use it only in accordance with the terms of the license
35  * agreement you entered into with iPlanet/Sun Microsystems.
36  */

37
38 package com.sun.enterprise.deployment.runtime;
39
40 import com.sun.enterprise.deployment.Descriptor;
41 import com.sun.enterprise.deployment.DescriptorConstants;
42
43 /** iAS specific DD Element (see the ias-ejb-jar_2_0.dtd for this element)
44  * @author Ludo
45  * @since JDK 1.4
46  */

47 public class BeanCacheDescriptor extends Descriptor implements DescriptorConstants{
48
49         private Boolean JavaDoc isCacheOverflowAllowed;
50         private String JavaDoc victimSelectionPolicy;
51         
52         //initialized default values for class variables
53
private int maxCacheSize = MAX_CACHE_SIZE_DEFAULT;
54         private int resizeQuantity = RESIZE_QUANTITY_DEFAULT;
55         private int cacheIdleTimeoutInSeconds = CACHE_IDLE_TIMEOUT_DEFAULT;
56         private int removalTimeoutInSeconds = REMOVAL_TIMEOUT_DEFAULT;
57         
58         /** Default constructor. */
59     public BeanCacheDescriptor() {
60     }
61
62         /**
63          * Getter for property cacheIdleTimeoutInSeconds.
64          * @return Value of property cacheIdleTimeoutInSeconds.
65          */

66         public int getCacheIdleTimeoutInSeconds() {
67             return cacheIdleTimeoutInSeconds;
68         }
69         
70         /**
71          * Setter for property cacheIdleTimeoutInSeconds.
72          * @param cacheIdleTimeoutInSeconds New value of property cacheIdleTimeoutInSeconds.
73          */

74
75         public void setCacheIdleTimeoutInSeconds(int cacheIdleTimeoutInSeconds) {
76             this.cacheIdleTimeoutInSeconds = cacheIdleTimeoutInSeconds;
77         }
78         
79         /**
80          * Getter for property isCacheOverflowAllowed.
81          * @return Value of property isCacheOverflowAllowed.
82          */

83         public Boolean JavaDoc isIsCacheOverflowAllowed() {
84             return isCacheOverflowAllowed;
85         }
86         
87         /**
88          * Setter for property isCacheOverflowAllowed.
89          * @param isCacheOverflowAllowed New value of property isCacheOverflowAllowed.
90          */

91         public void setIsCacheOverflowAllowed(boolean isCacheOverflowAllowed) {
92             this.isCacheOverflowAllowed = new Boolean JavaDoc(isCacheOverflowAllowed);
93         }
94         
95         /**
96          * Setter for property isCacheOverflowAllowed.
97          * @param isCacheOverflowAllowed New value of property isCacheOverflowAllowed.
98          */

99         public void setIsCacheOverflowAllowed(Boolean JavaDoc isCacheOverflowAllowed) {
100             this.isCacheOverflowAllowed = isCacheOverflowAllowed;
101         }
102
103         /**
104          * Getter for property maxCacheSize.
105          * @return Value of property maxCacheSize.
106          */

107         public int getMaxCacheSize() {
108             return maxCacheSize;
109         }
110         
111         /**
112          * Setter for property maxCacheSize.
113          * @param maxCacheSize New value of property maxCacheSize.
114          */

115         public void setMaxCacheSize(int maxCacheSize) {
116             this.maxCacheSize = maxCacheSize;
117         }
118         
119         /**
120          * Getter for property resizeQuantity.
121          * @return Value of property resizeQuantity.
122          */

123         public int getResizeQuantity() {
124             return resizeQuantity;
125         }
126         
127         /**
128          * Setter for property resizeQuantity.
129          * @param resizeQuantity New value of property resizeQuantity.
130          */

131         public void setResizeQuantity(int resizeQty) {
132             this.resizeQuantity = resizeQty;
133         }
134         
135         /**
136          * Getter for property removalTimeoutInSeconds.
137          * @return Value of property removalTimeoutInSeconds.
138          */

139         public int getRemovalTimeoutInSeconds() {
140             return removalTimeoutInSeconds;
141         }
142         
143         /**
144          * Setter for property removalTimeoutInSeconds.
145          * @param removalTimeoutInSeconds New value of property removalTimeoutInSeconds.
146          */

147         public void setRemovalTimeoutInSeconds(int removalTimeoutInSeconds) {
148             this.removalTimeoutInSeconds = removalTimeoutInSeconds;
149         }
150         
151         /**
152          * Getter for property victimSelectionPolicy.
153          * @return Value of property victimSelectionPolicy.
154          */

155         public java.lang.String JavaDoc getVictimSelectionPolicy() {
156             return victimSelectionPolicy;
157         }
158         
159         /**
160          * Setter for property victimSelectionPolicy.
161          * @param victimSelectionPolicy New value of property victimSelectionPolicy.
162          */

163         public void setVictimSelectionPolicy(java.lang.String JavaDoc victimSelectionPolicy) {
164             this.victimSelectionPolicy = victimSelectionPolicy;
165         }
166 }
167
Popular Tags