1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. The ASF licenses this file to You 4 * under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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 /** 34 * Represents someone that wants to receive notifications about cache 35 * invalidation events. 36 * 37 * A CacheHandler can be registered with the CacheManager and then will 38 * receive all the various object invalidation events happening in the 39 * system. Typically classes which are using a cache will want to implement 40 * this interface so that they can know when to remove items from their cache. 41 */ 42 public interface CacheHandler { 43 44 public void invalidate(WeblogEntryData entry); 45 46 public void invalidate(WebsiteData website); 47 48 public void invalidate(BookmarkData bookmark); 49 50 public void invalidate(FolderData folder); 51 52 public void invalidate(CommentData comment); 53 54 public void invalidate(RefererData referer); 55 56 public void invalidate(UserData user); 57 58 public void invalidate(WeblogCategoryData category); 59 60 public void invalidate(WeblogTemplate template); 61 62 } 63