View Javadoc

1   package org.apache.jcs.auxiliary.disk.behavior;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
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 }