1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.apache.commons.cache; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
public interface Stash extends Serializable { |
26 | |
public static final int YES = 1; |
27 | |
public static final int NO_FULL = 2; |
28 | |
public static final int NO_NOT_STORABLE = 3; |
29 | |
public static final int NO = 4; |
30 | |
|
31 | |
public int canStore(Serializable key, Serializable val, Long expiresAt, Long cost, Serializable group); |
32 | |
public int canStore(Serializable key, Serializable val, Long expiresAt, Long cost, Serializable group, byte[] serialized); |
33 | |
public boolean store(Serializable key, Serializable val, Long expiresAt, Long cost, Serializable group); |
34 | |
public boolean store(Serializable key, Serializable val, Long expiresAt, Long cost, Serializable group, byte[] serialized); |
35 | |
public Serializable retrieve(Serializable key); |
36 | |
public boolean contains(Serializable key); |
37 | |
public void clear(Serializable key); |
38 | |
public void clear(); |
39 | |
public float capacity(); |
40 | |
|
41 | |
|
42 | |
public void setCache(Cache c); |
43 | |
public void unsetCache(); |
44 | |
public boolean wantsSerializedForm(); |
45 | |
} |