Java Doc for UnOrderedCache.java in  » J2EE » Expresso » com » jcorporate » expresso » core » 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 » J2EE » Expresso » com.jcorporate.expresso.core.cache 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.core.cache.UnOrderedCache

UnOrderedCache
public class UnOrderedCache implements Cache(Code)
Unordered cache is a hash map backed class. As such, access to individual items is relatively quick. However getting all the items in cache is a very slow process, and the order of the items is not guaranteed.

If the size of the unordered cache is specified, then the cache automatically uses the least recently used (LRU) algorithm to determine which items should be removed from the cache.

Unless you need to specifically store arrays of objects then this will be the cache to use for most of your needs. Creation date: (9/7/00 11:47:14 AM)




Constructor Summary
public  UnOrderedCache()
     UnOrderedCache constructor comment.

Method Summary
public  voidaddItem(CacheEntry newItem)
    
public  voidclear()
    
public  CacheEntrygetCacheEntry(String itemKey)
    
public  CacheablegetItem(String itemKey)
     Get an item as defined by the key.
public  intgetItemCount()
    
public  VectorgetItems()
     Return all the items in a Vector This is a REALLY messy function for unordered caches.
public synchronized  StringgetName()
    
public synchronized  longgetUsedCount()
    
public  booleanisOrdered()
     Retrieve whether the cache instance is an ordered cache [list based] or unordered cache.
public synchronized  voidremoveItem(Cacheable oldItem)
    
public  voidsetItems(java.util.List newItems)
    
public  voidsetItems(Vector newItems)
     Goes through all the new items and adds them to the list.
public synchronized  voidsetMaxSize(int newMaxSize)
     Sets the maximum size for the cache.
public synchronized  voidsetName(String newName)
    


Constructor Detail
UnOrderedCache
public UnOrderedCache()(Code)
UnOrderedCache constructor comment.




Method Detail
addItem
public void addItem(CacheEntry newItem)(Code)
Adds an item to this cache
Parameters:
  newItem - The new item to cache



clear
public void clear()(Code)
Clear the cache by creating a new map



getCacheEntry
public CacheEntry getCacheEntry(String itemKey)(Code)
Retrieve the cache entry specified by the item key
Parameters:
  itemKey - the key for the cache entry the resulting cache entry or null if it no longer exists.



getItem
public Cacheable getItem(String itemKey)(Code)
Get an item as defined by the key.
Parameters:
  itemKey - The item's key Cacheable object or null if it doesn't exist in thecache



getItemCount
public int getItemCount()(Code)
Get the number of items in the cache the number of items in this cache



getItems
public Vector getItems()(Code)
Return all the items in a Vector This is a REALLY messy function for unordered caches. Use very INFREQUENTLY java.util.Vector of all the items.



getName
public synchronized String getName()(Code)
Returns the name of this cache java.lang.String the name of the cache



getUsedCount
public synchronized long getUsedCount()(Code)
Return the number of times this cache has been accessed the number of times accessed as integer



isOrdered
public boolean isOrdered()(Code)
Retrieve whether the cache instance is an ordered cache [list based] or unordered cache. [map based] true if the cache is an ordered cache.



removeItem
public synchronized void removeItem(Cacheable oldItem)(Code)
Removes an item as keyed by the paramter
Parameters:
  oldItem - The item to remove.



setItems
public void setItems(java.util.List newItems) throws CacheException(Code)
Eventually the new way to set items
Parameters:
  newItems - the new items to add
throws:
  CacheException - upon error



setItems
public void setItems(Vector newItems) throws CacheException(Code)
Goes through all the new items and adds them to the list.
Parameters:
  newItems - A java.util.Vector of new items to add tothe cache list
throws:
  CacheException - if there's an error adding the cache entry items



setMaxSize
public synchronized void setMaxSize(int newMaxSize)(Code)
Sets the maximum size for the cache. If it is greater than zero then we use an LRU Map instead of a normal hashmap to provide automatic removal of old items.
Parameters:
  newMaxSize - The new maximum size to use for the cache



setName
public synchronized void setName(String newName)(Code)
Sets the name of the cache
Parameters:
  newName - the new name to set for the cache.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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