@Test public void testWakeup() { ServiceThread testServiceThread = startTestServiceThread(); testServiceThread.wakeup(); assertEquals(true, testServiceThread.hasNotified.get()); assertEquals(0, testServiceThread.waitPoint.getCount()); }
public void wakeup() { if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); } }
ServiceThread implements Runnable { public void wakeup() { if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); } } }
ServiceThread implements Runnable { public void wakeup() { if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); } } ServiceThread(); }
ServiceThread implements Runnable { public void wakeup() { if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); } } ServiceThread(); abstract String getServiceName(); void start(); void shutdown(); void shutdown(final boolean interrupt); long getJointime(); @Deprecated void stop(); @Deprecated void stop(final boolean interrupt); void makeStop(); void wakeup(); boolean isStopped(); boolean isDaemon(); void setDaemon(boolean daemon); }
ServiceThread implements Runnable { public void wakeup() { if (hasNotified.compareAndSet(false, true)) { waitPoint.countDown(); } } ServiceThread(); abstract String getServiceName(); void start(); void shutdown(); void shutdown(final boolean interrupt); long getJointime(); @Deprecated void stop(); @Deprecated void stop(final boolean interrupt); void makeStop(); void wakeup(); boolean isStopped(); boolean isDaemon(); void setDaemon(boolean daemon);  }