Package com.google.common.util.concurrent

Examples of com.google.common.util.concurrent.AbstractScheduledService$CustomScheduler


  private final List<IWVWObjective> content = new CopyOnWriteArrayList<IWVWObjective>();

  private Service service;

  public MapObjectivesTableModel() {
    this.service = new AbstractScheduledService() {
      @Override
      protected void runOneIteration() throws Exception {
        int row = 0;
        for (IWVWObjective content : MapObjectivesTableModel.this.content) {
          if (content.getRemainingBuffDuration(TimeUnit.SECONDS) > 0) {
View Full Code Here


  @Inject
  public APIStatusTableModel(IGW2StatsService gw2statsService) {
    this.gw2statsService = checkNotNull(gw2statsService);
    // TODO refactor this to an event based system -> wrap it
    final AbstractScheduledService service = new AbstractScheduledService() {
      @Override
      protected Scheduler scheduler() {
        return AbstractScheduledService.Scheduler.newFixedDelaySchedule(0, 5000, TimeUnit.MILLISECONDS);
      }

      @Override
      protected void runOneIteration() throws Exception {
        APIStatusTableModel.this.states = APIStatusTableModel.this.gw2statsService.retrieveAPIStates();
        APIStatusTableModel.this.fireTableDataChanged();
      }
    };
    service.start();
  }
View Full Code Here

TOP

Related Classes of com.google.common.util.concurrent.AbstractScheduledService$CustomScheduler

Copyright © 2018 www.massapicom. 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.