1 package org.apache.jcs.auxiliary.disk.behavior;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.jcs.auxiliary.AuxiliaryCacheAttributes;
23
24 /***
25 * Common disk cache attributes.
26 */
27 public interface IDiskCacheAttributes
28 extends AuxiliaryCacheAttributes
29 {
30 /***
31 * This is the default purgatory size limit. Purgatory is the area where
32 * items to be spooled are temporarily stored. It basically provides access
33 * to items on the to-be-spooled queue.
34 */
35 public static final int MAX_PURGATORY_SIZE_DEFUALT = 5000;
36
37 /***
38 * Sets the diskPath attribute of the IJISPCacheAttributes object
39 * <p>
40 * @param path
41 * The new diskPath value
42 */
43 public void setDiskPath( String path );
44
45 /***
46 * Gets the diskPath attribute of the attributes object
47 * <p>
48 * @return The diskPath value
49 */
50 public String getDiskPath();
51
52 /***
53 * Gets the maxKeySize attribute of the DiskCacheAttributes object
54 * <p>
55 * @return The maxPurgatorySize value
56 */
57 public int getMaxPurgatorySize();
58
59 /***
60 * Sets the maxPurgatorySize attribute of the DiskCacheAttributes object
61 * <p>
62 * @param maxPurgatorySize
63 * The new maxPurgatorySize value
64 */
65 public void setMaxPurgatorySize( int maxPurgatorySize );
66
67 /***
68 * Get the amount of time in seconds we will wait for elements to move to
69 * disk during shutdown for a particular region.
70 * <p>
71 * @return the time in seconds.
72 */
73 public int getShutdownSpoolTimeLimit();
74
75 /***
76 * Sets the amount of time in seconds we will wait for elements to move to
77 * disk during shutdown for a particular region.
78 * <p>
79 * This is how long we give the event queue to empty.
80 * <p>
81 * The default is 60 seconds.
82 * <p>
83 * @param shutdownSpoolTimeLimit
84 * the time in seconds
85 */
86 public void setShutdownSpoolTimeLimit( int shutdownSpoolTimeLimit );
87
88 /***
89 * If this is true then remove all is not prohibited.
90 * <p>
91 * @return boolean
92 */
93 public boolean isAllowRemoveAll();
94
95 /***
96 * If this is false, then remove all requests will not be honored.
97 * <p>
98 * This provides a safety mechanism for the persistent store.
99 * <p>
100 * @param allowRemoveAll
101 */
102 public void setAllowRemoveAll( boolean allowRemoveAll );
103 }