public synchronized void updateCurrentMarket() { Price buyTopPrice = buySide.topOfBookPrice(); if (buyTopPrice == null) buyTopPrice = PriceFactory.makeLimitPrice((long) 0); Price sellTopPrice = sellSide.topOfBookPrice(); if (sellTopPrice == null) sellTopPrice = PriceFactory.makeLimitPrice((long) 0); String str = buyTopPrice.toString() + buySide.topOfBookVolume() + sellTopPrice.toString() + sellSide.topOfBookVolume(); if (!this.lastCurrentMarket.equals(str)) { MarketDataDTO mktDTO = new MarketDataDTO( this.productSymbol, buyTopPrice, buySide.topOfBookVolume(), sellTopPrice, sellSide.topOfBookVolume()); CurrentMarketPublisher.getInstance().publishCurrentMarket(mktDTO); lastCurrentMarket = str; } }