Java 类com.google.common.util.concurrent.ListenerCallQueue.Callback 实例源码

项目:googles-monorepo-demo    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:googles-monorepo-demo    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:googles-monorepo-demo    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:googles-monorepo-demo    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:googles-monorepo-demo    文件:ListenerCallQueueTest.java   
private Callback<Object> incrementingCallback(final AtomicInteger counter, final int expected) {
  return new Callback<Object>("incrementing") {
    @Override void call(Object listener) {
      assertEquals(expected, counter.incrementAndGet());
    }
  };
}
项目:googles-monorepo-demo    文件:ListenerCallQueueTest.java   
private Callback<Object> countDownCallback(final CountDownLatch latch) {
  return new Callback<Object>("countDown") {
    @Override void call(Object listener) {
      latch.countDown();
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(
  final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(
  final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(
  final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(
  final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override
    void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:codebuff    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override
    void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:codebuff    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override
    void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:guava-libraries    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:guava-libraries    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:guava-libraries    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:guava-libraries    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:guava-libraries    文件:ListenerCallQueueTest.java   
private Callback<Object> incrementingCallback(final AtomicInteger counter, final int expected) {
  return new Callback<Object>("incrementing") {
    @Override void call(Object listener) {
      assertEquals(expected, counter.incrementAndGet());
    }
  };
}
项目:guava-libraries    文件:ListenerCallQueueTest.java   
private Callback<Object> countDownCallback(final CountDownLatch latch) {
  return new Callback<Object>("countDown") {
    @Override void call(Object listener) {
      latch.countDown();
    }
  };
}
项目:cnGuava    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:cnGuava    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:cnGuava    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:cnGuava    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}
项目:org.openntf.domino    文件:AbstractService.java   
private static Callback<Listener> terminatedCallback(final State from) {
  return new Callback<Listener>("terminated({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.terminated(from);
    }
  };
}
项目:org.openntf.domino    文件:AbstractService.java   
private static Callback<Listener> stoppingCallback(final State from) {
  return new Callback<Listener>("stopping({from = " + from + "})") {
    @Override void call(Listener listener) {
      listener.stopping(from);
    }
  };
}
项目:org.openntf.domino    文件:AbstractService.java   
@GuardedBy("monitor")
private void failed(final State from, final Throwable cause) {
  // can't memoize this one due to the exception
  new Callback<Listener>("failed({from = " + from + ", cause = " + cause + "})") {
    @Override void call(Listener listener) {
      listener.failed(from, cause);
    }
  }.enqueueOn(listeners);
}
项目:org.openntf.domino    文件:ServiceManager.java   
@GuardedBy("monitor")
void fireFailedListeners(final Service service) {
  new Callback<Listener>("failed({service=" + service + "})") {
    @Override void call(Listener listener) {
      listener.failure(service);
    }
  }.enqueueOn(listeners);
}