Source Code Cross Referenced for CacheExtension.java in  » Cache » ehcache » net » sf » ehcache » extension » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Cache » ehcache » net.sf.ehcache.extension 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /**
02:         *  Copyright 2003-2007 Luck Consulting Pty Ltd
03:         *
04:         *  Licensed under the Apache License, Version 2.0 (the "License");
05:         *  you may not 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.
15:         */package net.sf.ehcache.extension;
16:
17:        import net.sf.ehcache.CacheException;
18:        import net.sf.ehcache.Ehcache;
19:        import net.sf.ehcache.Status;
20:
21:        /**
22:         * This is a general purpose mechanism to allow generic extensions to a Cache.
23:         * <p/>
24:         * CacheExtensions are tied into the Cache lifecycle. For that reason this interface has the lifecycle
25:         * methods.
26:         * <p/>
27:         * CacheExtensions are created using the CacheExtensionFactory which has a <code>createCacheCacheExtension()</code>
28:         * method which takes as a parameter a Cache and properties. It can thus call back into any public method on Cache,
29:         * including, of course, the load methods.
30:         * <p/>
31:         * CacheExtensions are suitable for timing services, where you want to create a timer to perform
32:         * cache operations. The other way of adding Cache behaviour is to decorate a cache. See
33:         * {@link net.sf.ehcache.constructs.blocking.BlockingCache} for an example of how to do this.
34:         * <p/>
35:         * Because a CacheExtension holds a reference to a Cache, the CacheExtension can do things such as registering a
36:         * CacheEventListener or even a CacheManagerEventListener, all from within a CacheExtension, creating more 
37:         * opportunities for customisation.
38:         *
39:         * @author <a href="mailto:gluck@gregluck.com">Greg Luck</a>
40:         * @version $Id: CacheExtension.java 535 2007-08-12 01:32:14Z gregluck $
41:         */
42:        public interface CacheExtension {
43:
44:            /**
45:             * Notifies providers to initialise themselves.
46:             * <p/>
47:             * This method is called during the Cache's initialise method after it has changed it's status to alive.
48:             * Cache operations are legal in this method.
49:             *
50:             * @throws CacheException
51:             */
52:            void init();
53:
54:            /**
55:             * Providers may be doing all sorts of exotic things and need to be able to clean up on
56:             * dispose.
57:             * <p/>
58:             * Cache operations are illegal when this method is called. The cache itself is partly disposed when this method
59:             * is called.
60:             *
61:             * @throws CacheException
62:             */
63:            void dispose() throws CacheException;
64:
65:            /**
66:             * Creates a clone of this extension. This method will only be called by ehcache before a
67:             * cache is initialized.
68:             * <p/>
69:             * Implementations should throw CloneNotSupportedException if they do not support clone but that
70:             * will stop them from being used with defaultCache.
71:             *
72:             * @return a clone
73:             * @throws CloneNotSupportedException if the extension could not be cloned.
74:             */
75:            public CacheExtension clone(Ehcache cache)
76:                    throws CloneNotSupportedException;
77:
78:            /**
79:             * @return the status of the extension
80:             */
81:            public Status getStatus();
82:        }
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.