1 package org.apache.jcs.engine.behavior;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Serializable;
23
24 import org.apache.jcs.engine.behavior.IElementAttributes;
25
26 /***
27 * Every item is the cache is wrapped in an ICacheElement. This contains
28 * information about the element: the region name, the key, the value, and the
29 * element attributes.
30 * <p>
31 * The element attributes have lots of useful information about each elment,
32 * such as when they were created, how long they have to live, and if they are
33 * allowed to be spooled, etc.
34 *
35 */
36 public interface ICacheElement
37 extends Serializable
38 {
39
40 /***
41 * Gets the cacheName attribute of the ICacheElement object. The cacheName
42 * is also known as the region name.
43 *
44 * @return The cacheName value
45 */
46 public String getCacheName();
47
48 /***
49 * Gets the key attribute of the ICacheElement object
50 *
51 * @return The key value
52 */
53 public Serializable getKey();
54
55 /***
56 * Gets the val attribute of the ICacheElement object
57 *
58 * @return The val value
59 */
60 public Serializable getVal();
61
62 /***
63 * Gets the attributes attribute of the ICacheElement object
64 *
65 * @return The attributes value
66 */
67 public IElementAttributes getElementAttributes();
68
69 /***
70 * Sets the attributes attribute of the ICacheElement object
71 *
72 * @param attr
73 * The new attributes value
74 */
75 public void setElementAttributes( IElementAttributes attr );
76 }