Clover coverage report - Coverage timestamp: do jan 22 2004 21:12:32 CET FRAMES NO FRAMES |
file stats: | LOC: | 60 |  | Methods: | 3
| NCLOC: | 18 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
CachewideEvent.java | - | 0% | 0% | 0% |

1 |  |
     /*
2 |  |
      * Copyright (c) 2002-2003 by OpenSymphony
3 |  |
      * All rights reserved.
4 |  |
      */
5 |  |
     package com.opensymphony.oscache.base.events;
6 |  |
7 |  |
     import com.opensymphony.oscache.base.Cache;
8 |  |
9 |  |
     import java.util.Date;
10 |  |
11 |  |
     /**
12 |  |
      * A <code>CachewideEvent<code> represents and event that occurs on
13 |  |
      * the the entire cache, eg a cache flush or clear.
14 |  |
      *
15 |  |
      * @version $Revision: 1.2 $
16 |  |
      * @author <a href="&#109;a&#105;&#108;&#116;&#111;:chris&#64;swebtec.&#99;&#111;&#109;">Chris Miller</a>
17 |  |
      */
18 |  |
     public final class CachewideEvent extends CacheEvent {
19 |  |
         /**
20 |  |
          * The cache where the event occurred.
21 |  |
          */
22 |  |
         private Cache cache = null;
23 |  |
24 |  |
         /**
25 |  |
          * The date/time for when the flush is scheduled
26 |  |
          */
27 |  |
         private Date date = null;
28 |  |
29 |  |
         /**
30 |  |
          * Constructs a cachewide event with the specified origin.
31 |  |
          *
32 |  |
          * @param cache   The cache map that the event occurred on.
33 |  |
          * @param date    The date/time that this cachewide event is scheduled for
34 |  |
          * (eg, the date that the cache is to be flushed).
35 |  |
          * @param origin  An optional tag that can be attached to the event to
36 |  |
          * specify the event's origin. This is useful to prevent events from being
37 |  |
          * fired recursively in some situations, such as when an event handler
38 |  |
          * causes another event to be fired.
39 |  |
          */
40 | 0 |
         public CachewideEvent(Cache cache, Date date, String origin) {
41 | 0 |
             super(origin);
42 | 0 |
             this.date = date;
43 | 0 |
             this.cache = cache;
44 |  |
         }
45 |  |
46 |  |
         /**
47 |  |
          * Retrieve the cache map that the event occurred on.
48 |  |
          */
49 | 0 |
         public Cache getCache() {
50 | 0 |
             return cache;
51 |  |
         }
52 |  |
53 |  |
         /**
54 |  |
          * Retrieve the date/time that the cache flush is scheduled for.
55 |  |
          */
56 | 0 |
         public Date getDate() {
57 | 0 |
             return date;
58 |  |
         }
59 |  |
     }
60 |  |