powerquotes.common
Class StockCache

java.lang.Object
  |
  +--powerquotes.common.StockCache

public class StockCache
extends java.lang.Object

Singleton class that represents the system's current knowledge about stocks This is updated as updates come in, and accessible when to service client subscriptions


Method Summary
 java.util.Collection getAllStocks()
           
 StockCache getInstance()
           
 StockInfo getStock(java.lang.Integer stockId)
           
 void setStock(StockInfo stock)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public StockCache getInstance()
Returns:
the instance of the StockCache

setStock

public void setStock(StockInfo stock)

getAllStocks

public java.util.Collection getAllStocks()

getStock

public StockInfo getStock(java.lang.Integer stockId)
Returns:
the StockInfo for this stockId or null if it wasn't found