Source Code Cross Referenced for CacheManager.java in  » 6.0-JDK-Modules » jsr107 » javax » cache » 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
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jsr107 » javax.cache 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package javax.cache;
002:
003:        import java.util.List;
004:        import java.util.Collection;
005:
006:        /**
007:         * A container for caches.
008:         *
009:         * The CacheManager maintains all aspects of the Cache lifecycle.
010:         *
011:         * Caches are not started until they are added to a CacheManager
012:         *
013:         * Each vendor will implement CacheManager. Multiple CacheManagers can run at the same time, be registered in
014:         * JNDI and so on.
015:         *
016:         *
017:         */
018:        public interface CacheManager {
019:
020:            enum State {
021:                STARTING, RUNNING, STOPPING, TERMINATED
022:            }
023:
024:            /**
025:             * Returns a Cache.
026:             * @param  name the name of the cache
027:             * @return
028:             */
029:            Cache getCache(String name) throws CacheException;
030:
031:            /**
032:             * Adds a {@link Cache} based on the default cache parameters with the given name.
033:             * <p/>
034:             * Memory and Disk stores will be configured for it and it will be added
035:             * to the map of caches.
036:             * <p/>
037:             * Also notifies the CacheManagerListener after the cache was initialised and added.
038:             * <p/>
039:             * It will be created with the defaultCache attributes specified in ehcache.xml
040:             *
041:             * @param cacheName the name for the cache
042:             * @throws CacheException        if there was an error creating the cache, for example because the cache already exists
043:             */
044:            void newCache(String cacheName) throws CacheException;
045:
046:            /**
047:             * Adds a {@link Cache} to the CacheManager.
048:             * <p/>
049:             * Memory and Disk stores will be configured for it and it will be added to the map of caches.
050:             * Also notifies the CacheManagerEventListener after the cache was initialised and added.
051:             *
052:             * @param cache
053:             * @throws IllegalStateException if the cache is not {@link State#STARTED} before this method is called.
054:             * @throws CacheException        if there was an error adding the cache to the CacheManager, for example because the Cache already exists in the CacheManager
055:             */
056:            void registerCache(String name, Cache cache)
057:                    throws IllegalStateException, CacheException;
058:
059:            /**
060:             * Checks whether a cache exists.
061:             * <p/>
062:             *
063:             * @param cacheName the cache name to check for
064:             * @return true if it exists
065:             * @throws IllegalStateException if the cache is not {@link State#STARTED}
066:             */
067:            boolean cacheExists(String cacheName) throws IllegalStateException;
068:
069:            /**
070:             * Remove a cache from the CacheManager. The cache is disposed of.
071:             *
072:             * @param cacheName the cache name
073:             * @throws IllegalStateException if the cache is not {@link State#STARTED}
074:             */
075:            void unregisterCache(String cacheName) throws IllegalStateException;
076:
077:            /**
078:             * Shuts down the CacheManager.
079:             */
080:            void shutdown();
081:
082:            /**
083:             * Returns a list of the current cache names.
084:             *
085:             * @return an array of {@link String}s
086:             * @throws IllegalStateException if the cache is not {@link State#STARTED}
087:             */
088:            Collection<String> getCacheNames() throws IllegalStateException;
089:
090:            /**
091:             * Gets the current state of the cache manager
092:             *
093:             * @return The status value from the State enum class
094:             */
095:            State getState();
096:
097:            /**
098:             * Gets the name of the CacheManager. This is useful for distinguishing multiple CacheManagers
099:             *
100:             * @return the name, or the output of toString() if it is not set.
101:             * @see #toString() which uses either the name or Object.toString()
102:             */
103:            String getName();
104:
105:            void addListener(CacheManagerListener cacheManagerListener);
106:
107:            void removeListener(CacheManagerListener cacheManagerListener);
108:
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.