KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > common > CacheInfoToken


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/CacheInfoToken.java,v 1.5 2004/07/28 09:38:21 ib Exp $
3  * $Revision: 1.5 $
4  * $Date: 2004/07/28 09:38:21 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.common;
25
26 /**
27  * Caching strategy token class.
28  *
29  */

30 public final class CacheInfoToken {
31     
32     
33     // ------------------------------------------------------------ Constructor
34

35     
36     /**
37      * Constructor.
38      *
39      * @param strategy describes the preferred strategy
40      */

41     public CacheInfoToken(String JavaDoc strategy) {
42         this.strategy = strategy;
43     }
44     
45     
46     /**
47      * Constructor.
48      *
49      */

50     public CacheInfoToken() {
51     }
52     
53     
54     // ----------------------------------------------------- Instance Variables
55

56     
57     /**
58      * Strategy.
59      */

60     private String JavaDoc strategy;
61     
62     
63     /**
64      * Browsing depth. For example, it can be used to represent the depth of
65      * a PROPFIND.
66      */

67     private int searchDepth;
68
69     
70     /**
71      * If true, the cache is used during a PROPFIND and then flushed.
72      * This enables the use of a cache to speed up PROPFIND searches
73      * without the need for tagging URIs clean or dirty.
74      */

75     private boolean flushOnCommandDone = true;
76     
77     
78     // ------------------------------------------------------------- Properties
79

80     
81     /**
82      * Returns the strategy.
83      */

84     public String JavaDoc getStrategy() {
85          return strategy;
86     }
87     
88     
89     /**
90      * set the strategy
91      */

92     public void setStrategy(String JavaDoc strategy) {
93         this.strategy = strategy;
94     }
95     
96     /**
97      * Returns the searchDepth.
98      */

99     public int getSearchDepth() {
100          return searchDepth;
101     }
102     
103     
104     /**
105      * set the searchDepth
106      */

107     public void setSearchDepth(int searchDepth) {
108         this.searchDepth = searchDepth;
109     }
110     
111     
112     /**
113      * Returns the searchDepth.
114      */

115     public boolean isFlushOnCommandDone() {
116          return flushOnCommandDone;
117     }
118     
119     
120     /**
121      * set the flushOnCommandDone
122      */

123     public void setFlushOnCommandDone(boolean flushOnCommandDone) {
124         this.flushOnCommandDone = flushOnCommandDone;
125     }
126     
127     
128 }
129
Popular Tags