01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.cache.file;
18:
19: import java.io.File;
20: import java.util.Date;
21:
22: /**
23: * @author <a href="weaver@apache.org">Scott T. Weaver</a>
24: *
25: */
26: public interface FileCacheEntry {
27: /**
28: * Get the file descriptor
29: *
30: * @return the file descriptor
31: */
32: File getFile();
33:
34: /**
35: * Set the file descriptor
36: *
37: * @param file the new file descriptor
38: */
39: void setFile(File file);
40:
41: /**
42: * Set the cache's last accessed stamp
43: *
44: * @param lastAccessed the cache's last access stamp
45: */
46: void setLastAccessed(long lastAccessed);
47:
48: /**
49: * Get the cache's lastAccessed stamp
50: *
51: * @return the cache's last accessed stamp
52: */
53: long getLastAccessed();
54:
55: /**
56: * Set the cache's last modified stamp
57: *
58: * @param lastModified the cache's last modified stamp
59: */
60: void setLastModified(Date lastModified);
61:
62: /**
63: * Get the entry's lastModified stamp (which may be stale compared to file's stamp)
64: *
65: * @return the last modified stamp
66: */
67: Date getLastModified();
68:
69: /**
70: * Set the Document in the cache
71: *
72: * @param document the document being cached
73: */
74: void setDocument(Object document);
75:
76: /**
77: * Get the Document
78: *
79: * @return the document being cached
80: */
81: Object getDocument();
82: }
|