01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. The ASF licenses this file to You
04: * under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License. For additional information regarding
15: * copyright in this work, please see the NOTICE file in the top level
16: * directory of this distribution.
17: */
18:
19: package org.apache.roller.util.cache;
20:
21: import java.util.Map;
22: import org.apache.roller.pojos.BookmarkData;
23: import org.apache.roller.pojos.CommentData;
24: import org.apache.roller.pojos.FolderData;
25: import org.apache.roller.pojos.RefererData;
26: import org.apache.roller.pojos.UserData;
27: import org.apache.roller.pojos.WeblogCategoryData;
28: import org.apache.roller.pojos.WeblogEntryData;
29: import org.apache.roller.pojos.WeblogTemplate;
30: import org.apache.roller.pojos.WebsiteData;
31:
32: /**
33: * Represents someone that wants to receive notifications about cache
34: * invalidation events.
35: *
36: * A CacheHandler can be registered with the CacheManager and then will
37: * receive all the various object invalidation events happening in the
38: * system. Typically classes which are using a cache will want to implement
39: * this interface so that they can know when to remove items from their cache.
40: */
41: public interface CacheHandler {
42:
43: public void invalidate(WeblogEntryData entry);
44:
45: public void invalidate(WebsiteData website);
46:
47: public void invalidate(BookmarkData bookmark);
48:
49: public void invalidate(FolderData folder);
50:
51: public void invalidate(CommentData comment);
52:
53: public void invalidate(RefererData referer);
54:
55: public void invalidate(UserData user);
56:
57: public void invalidate(WeblogCategoryData category);
58:
59: public void invalidate(WeblogTemplate template);
60:
61: }
|