예제 #1
0
 /**
  * @brief Delete from ALL auction lists!
  *     <p>The FilterManager does this, as it needs to be internally self-consistent.
  * @param ae - The auction entry to delete.
  */
 public void delEntry(AuctionEntry ae) {
   String id = ae.getIdentifier();
   DeletedEntry.create(id);
   ae.cancelSnipe(false);
   mFilter.deleteAuction(ae);
   ae.delete();
 }
예제 #2
0
  public int loadAuctionsFromDatabase() {
    int totalCount = AuctionInfo.count();
    int activeCount = AuctionEntry.activeCount();

    MQFactory.getConcrete("splash").enqueue("WIDTH " + activeCount);
    MQFactory.getConcrete("splash").enqueue("SET 0");

    AuctionServer newServer = AuctionServerManager.getInstance().getServer();
    AuctionServerManager.setEntryManager(this);
    if (totalCount == 0) {
      if (JConfig.queryConfiguration("stats.auctions") == null)
        JConfig.setConfiguration("stats.auctions", "0");
      return totalCount;
    }

    AuctionServerManager.getInstance().loadAuctionsFromDB(newServer);
    AuctionStats as = AuctionServerManager.getInstance().getStats();

    //  TODO -- Do something more valuable than just notify, when the auction counts are off.
    int savedCount = Integer.parseInt(JConfig.queryConfiguration("last.auctioncount", "-1"));
    if (as != null) {
      if (as.getCount() != activeCount || (savedCount != -1 && as.getCount() != savedCount)) {
        MQFactory.getConcrete("Swing").enqueue("NOTIFY Failed to load all auctions.");
      }
    }

    return activeCount;
  }
예제 #3
0
 public void updateConfiguration() {
   String newSnipeTime = JConfig.queryConfiguration("snipemilliseconds");
   if (newSnipeTime != null) {
     AuctionEntry.setDefaultSnipeTime(Long.parseLong(newSnipeTime));
   }
 }
예제 #4
0
 /**
  * @brief Verify that an auction entry exists.
  *     <p>This should query the filter manager instead of doing it itself. This would let
  *     FilterManager handle all this, and AuctionsManager wouldn't need to know anything too much
  *     about the items in the auction lists.
  * @note Both Verify and Get should proxy to FilterManager! FUTURE FEATURE -- mrs:
  *     29-September-2001 14:59
  * @param id - The auction id to search for.
  * @return - True if the item exists someplace in our list of Auctions.
  */
 public boolean verifyEntry(String id) {
   return AuctionEntry.findByIdentifier(id) != null;
 }