Package com.jbidwatcher.util.queue

Examples of com.jbidwatcher.util.queue.MessageQueue.enqueue()


  private void spinOffCompletedLoader(final AuctionServer newServer) {
    Thread completedHandler = new Thread() {
      public void run() {
        final MessageQueue tabQ = MQFactory.getConcrete("complete Tab");
        tabQ.enqueue("REPORT Importing completed listings");
        tabQ.enqueue("SHOW");

        timeStart("findEnded");
        List<AuctionEntry> entries = AuctionEntry.findEnded();//TODO EntryCorral these?
        timeStop("findEnded");
View Full Code Here


  private void spinOffCompletedLoader(final AuctionServer newServer) {
    Thread completedHandler = new Thread() {
      public void run() {
        final MessageQueue tabQ = MQFactory.getConcrete("complete Tab");
        tabQ.enqueue("REPORT Importing completed listings");
        tabQ.enqueue("SHOW");

        timeStart("findEnded");
        List<AuctionEntry> entries = AuctionEntry.findEnded();//TODO EntryCorral these?
        timeStop("findEnded");
View Full Code Here

        timeStop("findEnded");

        int endedCount = entries.size();
        final double percentStep = ((double)endedCount) / 100.0;
        final double percentMultiple = 100.0 / ((double)endedCount);
        tabQ.enqueue("PROGRESS");
        tabQ.enqueue("PROGRESS Loading...");
        importListingsToUI(newServer, entries, new Report() {
          public void report(AuctionEntry ae, int count) {
            if(percentStep < 1.0) {
              tabQ.enqueue("PROGRESS " + Math.round(count * percentMultiple));
 
View Full Code Here

        int endedCount = entries.size();
        final double percentStep = ((double)endedCount) / 100.0;
        final double percentMultiple = 100.0 / ((double)endedCount);
        tabQ.enqueue("PROGRESS");
        tabQ.enqueue("PROGRESS Loading...");
        importListingsToUI(newServer, entries, new Report() {
          public void report(AuctionEntry ae, int count) {
            if(percentStep < 1.0) {
              tabQ.enqueue("PROGRESS " + Math.round(count * percentMultiple));
            } else {
View Full Code Here

        tabQ.enqueue("PROGRESS");
        tabQ.enqueue("PROGRESS Loading...");
        importListingsToUI(newServer, entries, new Report() {
          public void report(AuctionEntry ae, int count) {
            if(percentStep < 1.0) {
              tabQ.enqueue("PROGRESS " + Math.round(count * percentMultiple));
            } else {
              if(count % (Math.round(percentStep)) == 0) {
                tabQ.enqueue("PROGRESS " + Math.round(count / percentStep));
              }
            }
View Full Code Here

          public void report(AuctionEntry ae, int count) {
            if(percentStep < 1.0) {
              tabQ.enqueue("PROGRESS " + Math.round(count * percentMultiple));
            } else {
              if(count % (Math.round(percentStep)) == 0) {
                tabQ.enqueue("PROGRESS " + Math.round(count / percentStep));
              }
            }
            try { Thread.sleep(50); } catch(InterruptedException ie) { /* ignore */ }
          }
        });
View Full Code Here

              }
            }
            try { Thread.sleep(50); } catch(InterruptedException ie) { /* ignore */ }
          }
        });
        tabQ.enqueue("HIDE");
        AuctionEntry.getRealDatabase().commit();
      }
    };
    Thread lostHandler = new Thread() {
      public void run() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.