Java Doc for FIFOCache.java in  » Cache » OSCache » com » opensymphony » oscache » base » algorithm » 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 » OSCache » com.opensymphony.oscache.base.algorithm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.AbstractMap
      com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
         com.opensymphony.oscache.base.algorithm.FIFOCache

FIFOCache
public class FIFOCache extends AbstractConcurrentReadCache (Code)
FIFO (First In First Out) based queue algorithm for the cache. No synchronization is required in this class since the AbstractConcurrentReadCache already takes care of any synchronization requirements.
version:
   $Revision: 427 $
author:
   Mike Cannon-Brookes
author:
   Alain Bergevin
author:
   Chris Miller



Constructor Summary
public  FIFOCache()
     Constructs a FIFO Cache.
public  FIFOCache(int capacity)
     Constructs a FIFO Cache of the specified capacity.

Method Summary
protected  voiditemPut(Object key)
     An object was put in the cache.
protected  voiditemRemoved(Object key)
     Remove specified key since that object has been removed from the cache.
protected  voiditemRetrieved(Object key)
     An object was retrieved from the cache.
protected  ObjectremoveItem()
     An item needs to be removed from the cache.


Constructor Detail
FIFOCache
public FIFOCache()(Code)
Constructs a FIFO Cache.



FIFOCache
public FIFOCache(int capacity)(Code)
Constructs a FIFO Cache of the specified capacity.
Parameters:
  capacity - The maximum cache capacity.




Method Detail
itemPut
protected void itemPut(Object key)(Code)
An object was put in the cache. This implementation just adds the key to the end of the list if it doesn't exist in the list already.
Parameters:
  key - The cache key of the item that was put.



itemRemoved
protected void itemRemoved(Object key)(Code)
Remove specified key since that object has been removed from the cache.
Parameters:
  key - The cache key of the item that was removed.



itemRetrieved
protected void itemRetrieved(Object key)(Code)
An object was retrieved from the cache. This implementation does noting since this event has no impact on the FIFO algorithm.
Parameters:
  key - The cache key of the item that was retrieved.



removeItem
protected Object removeItem()(Code)
An item needs to be removed from the cache. The FIFO implementation removes the first element in the list (ie, the item that has been in the cache for the longest time). The key of whichever item was removed.



Fields inherited from com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
final public static int DEFAULT_INITIAL_CAPACITY(Code)(Java Doc)
final public static float DEFAULT_LOAD_FACTOR(Code)(Java Doc)
final protected int DEFAULT_MAX_ENTRIES(Code)(Java Doc)
final protected static String NULL(Code)(Java Doc)
final protected int UNLIMITED(Code)(Java Doc)
final protected Boolean barrierLock(Code)(Java Doc)
protected transient int count(Code)(Java Doc)
protected transient Set entrySet(Code)(Java Doc)
protected HashMap groups(Code)(Java Doc)
protected transient Set keySet(Code)(Java Doc)
protected transient Object lastWrite(Code)(Java Doc)
protected float loadFactor(Code)(Java Doc)
protected int maxEntries(Code)(Java Doc)
protected boolean memoryCaching(Code)(Java Doc)
protected transient PersistenceListener persistenceListener(Code)(Java Doc)
protected transient Entry[] table(Code)(Java Doc)
protected int threshold(Code)(Java Doc)
protected boolean unlimitedDiskCache(Code)(Java Doc)
protected transient Collection values(Code)(Java Doc)

Methods inherited from com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
public synchronized int capacity()(Code)(Java Doc)
public synchronized void clear()(Code)(Java Doc)
public synchronized Object clone()(Code)(Java Doc)
public boolean contains(Object value)(Code)(Java Doc)
public boolean containsKey(Object key)(Code)(Java Doc)
public boolean containsValue(Object value)(Code)(Java Doc)
public Enumeration elements()(Code)(Java Doc)
public Set entrySet()(Code)(Java Doc)
protected synchronized boolean findAndRemoveEntry(Map.Entry entry)(Code)(Java Doc)
public Object get(Object key)(Code)(Java Doc)
public Set getGroup(String groupName)(Code)(Java Doc)
final protected synchronized Set getGroupForReading(String groupName)(Code)(Java Doc)
final protected Map getGroupsForReading()(Code)(Java Doc)
public int getMaxEntries()(Code)(Java Doc)
public PersistenceListener getPersistenceListener()(Code)(Java Doc)
final protected Entry[] getTableForReading()(Code)(Java Doc)
public synchronized boolean isEmpty()(Code)(Java Doc)
public boolean isMemoryCaching()(Code)(Java Doc)
public boolean isOverflowPersistence()(Code)(Java Doc)
public boolean isUnlimitedDiskCache()(Code)(Java Doc)
abstract protected void itemPut(Object key)(Code)(Java Doc)
abstract protected void itemRemoved(Object key)(Code)(Java Doc)
abstract protected void itemRetrieved(Object key)(Code)(Java Doc)
public Set keySet()(Code)(Java Doc)
public Enumeration keys()(Code)(Java Doc)
public float loadFactor()(Code)(Java Doc)
protected void persistClear()(Code)(Java Doc)
protected void persistRemove(Object key)(Code)(Java Doc)
protected void persistRemoveGroup(String groupName)(Code)(Java Doc)
protected Object persistRetrieve(Object key)(Code)(Java Doc)
protected Set persistRetrieveGroup(String groupName)(Code)(Java Doc)
protected void persistStore(Object key, Object obj)(Code)(Java Doc)
protected void persistStoreGroup(String groupName, Set group)(Code)(Java Doc)
public Object put(Object key, Object value)(Code)(Java Doc)
public synchronized void putAll(Map t)(Code)(Java Doc)
final protected void recordModification(Object x)(Code)(Java Doc)
protected void rehash()(Code)(Java Doc)
public Object remove(Object key)(Code)(Java Doc)
public Object removeForce(Object key)(Code)(Java Doc)
abstract protected Object removeItem()(Code)(Java Doc)
public void setMaxEntries(int newLimit)(Code)(Java Doc)
public void setMemoryCaching(boolean memoryCaching)(Code)(Java Doc)
public void setOverflowPersistence(boolean overflowPersistence)(Code)(Java Doc)
public void setPersistenceListener(PersistenceListener listener)(Code)(Java Doc)
public void setUnlimitedDiskCache(boolean unlimitedDiskCache)(Code)(Java Doc)
public synchronized int size()(Code)(Java Doc)
protected Object sput(Object key, Object value, int hash, boolean persist)(Code)(Java Doc)
protected Object sremove(Object key, int hash, boolean invokeAlgorithm)(Code)(Java Doc)
public Collection values()(Code)(Java Doc)

Methods inherited from java.util.AbstractMap
public void clear()(Code)(Java Doc)
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean containsKey(Object key)(Code)(Java Doc)
public boolean containsValue(Object value)(Code)(Java Doc)
abstract public Set<Entry<K, V>> entrySet()(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
public V get(Object key)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public Set<K> keySet()(Code)(Java Doc)
public V put(K key, V value)(Code)(Java Doc)
public void putAll(Map<? extends K, ? extends V> m)(Code)(Java Doc)
public V remove(Object key)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public Collection<V> values()(Code)(Java Doc)

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 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.