Java Doc for CachePolicy.java in  » Database-DBMS » JDBM » jdbm » helper » 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 » Database DBMS » JDBM » jdbm.helper 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


jdbm.helper.CachePolicy

All known Subclasses:   jdbm.helper.SoftCache,  jdbm.helper.MRU,
CachePolicy
public interface CachePolicy (Code)
CachePolicity is an abstraction for different cache policies. (ie. MRU, time-based, soft-refs, ...)
author:
   Alex Boisvert
author:
   Dilum Ranatunga
version:
   $Id: CachePolicy.java,v 1.5 2003/11/01 13:25:02 dranatunga Exp $




Method Summary
public  voidaddListener(CachePolicyListener listener)
     Add a listener to this cache policy.
public  Enumerationelements()
     Enumerate through the objects currently in the cache.
public  Objectget(Object key)
     Obtain the object stored under the key specified.
public  voidput(Object key, Object value)
     Place an object in the cache.
public  voidremove(Object key)
     Remove the object stored under the key specified.
public  voidremoveAll()
     Remove all objects from the cache.
public  voidremoveListener(CachePolicyListener listener)
     Remove a listener from this cache policy.



Method Detail
addListener
public void addListener(CachePolicyListener listener) throws IllegalArgumentException(Code)
Add a listener to this cache policy.

If this cache policy already contains a listener that is equal to the one being added, this call has no effect.
Parameters:
  listener - the (non-null) listener to add to this policy
throws:
  IllegalArgumentException - if listener is null.




elements
public Enumeration elements()(Code)
Enumerate through the objects currently in the cache.



get
public Object get(Object key)(Code)
Obtain the object stored under the key specified.
Parameters:
  key - key the object was cached under the object if it is still in the cache, null otherwise.



put
public void put(Object key, Object value) throws CacheEvictionException(Code)
Place an object in the cache. If the cache does not currently contain an object for the key specified, this mapping is added. If an object currently exists under the specified key, the current object is replaced with the new object.

If the changes to the cache cause the eviction of any objects stored under other key(s), events corresponding to the evictions are fired for each object. If an event listener is unable to handle the eviction, and throws a cache eviction exception, that exception is propagated to the caller. If such an exception is thrown, the cache itself should be left as it was before the put() operation was invoked: the the object whose eviction failed is still in the cache, and the new insertion or modification is reverted.
Parameters:
  key - key for the cached object
Parameters:
  value - the cached object
throws:
  CacheEvictionException - propagated if, while evicting objectsto make room for new object, an eviction listener encounteredthis problem.




remove
public void remove(Object key)(Code)
Remove the object stored under the key specified. Note that since eviction notices are only fired when objects under different keys are evicted, no event is fired for any object stored under this key (see CachePolicy.put(Object,Object) put( ) ).
Parameters:
  key - key the object was stored in the cache under.



removeAll
public void removeAll()(Code)
Remove all objects from the cache. Consistent with CachePolicy.remove(Object) remove( ) , no eviction notices are fired.



removeListener
public void removeListener(CachePolicyListener listener)(Code)
Remove a listener from this cache policy. The listener is found using object equality, not identity.
Parameters:
  listener - the listener to remove from this policy



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.