|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mov.quote.EODQuoteBundleCache
public class EODQuoteBundleCache
This class is responsible for caching quote bundles. When a EODQuoteBundle
is
created it tries to load itself into memory by calling the load()
method in
this class. When this method is called, this class will make sure that all of its quotes
are loaded in the EODQuoteCache
. If not, it will try and load only the quotes not
present in the quote cache.
When this class loads quotes into the quote cache, it will check to make sure the quote cache hasn't got too big. If it has, it will free up the quotes used only by the oldest quote caches.
Its possible that the oldest quote bundle is still in use, in which case when the
quote bundle tries to access the cache it might not find its quote.
If thats the case, it will call load()
again to reload the quotes.
EODQuote
,
EODQuoteBundle
,
EODQuoteCache
,
Symbol
Method Summary | |
---|---|
void |
expand(EODQuoteBundle quoteBundle,
EODQuoteRange expandedQuoteRange)
Expand the given quote bundle to include quotes from the new quote range. |
static EODQuoteBundleCache |
getInstance()
Create or return the singleton instance of the quote bundle cache. |
boolean |
isLoaded(EODQuoteBundle quoteBundle)
Return whether the given quote bundle is loaded or not. |
void |
load(EODQuoteBundle quoteBundle)
Make sure all the quotes needed by the quote bundle are in the quote cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EODQuoteBundleCache getInstance()
public void expand(EODQuoteBundle quoteBundle, EODQuoteRange expandedQuoteRange)
quoteBundle
- the quote bundle to expandexpandedQuoteRange
- the quote bundles new quote rangepublic void load(EODQuoteBundle quoteBundle)
quoteBundle
- the quote bundle to loadEODQuoteCache
public boolean isLoaded(EODQuoteBundle quoteBundle)
quoteBundle
- the quote bundle to check
true
if the quote bundle is loaded
|
Venice 0.7beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |