com.google.common.util.concurrent.Service.State#RUNNING源码实例Demo

下面列出了com.google.common.util.concurrent.Service.State#RUNNING 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: usergrid   文件: AbstractSchedulerRuntimeIT.java
@Before
@SuppressWarnings( "all" )
public void setup() {

    props = springResource.getBean( "properties", Properties.class );
    scheduler = springResource.getBean( SchedulerService.class );

    if ( System.getProperties().containsKey( COUNT_PROP ) ) {
        count = Integer.getInteger( System.getProperty( COUNT_PROP ) );
    }

    // start the scheduler after we're all set up
    JobSchedulerService jobScheduler = springResource.getBean( JobSchedulerService.class );
    jobScheduler.setJobListener( listener );
    if ( jobScheduler.state() != State.RUNNING ) {
        jobScheduler.startAsync();
        jobScheduler.awaitRunning();
    }
}
 
源代码2 项目: gemfirexd-oss   文件: AbstractRegion.java
public void initilializeCustomEvictor() {
  LogWriterI18n logger = getSystem().getLogWriter().convertToLogWriterI18n();
  if (getCustomEvictionAttributes() != null
      && !getCustomEvictionAttributes().isEvictIncoming()) {
    State st = getEvictorTask().startAndWait();
    if (st != State.RUNNING) {
      if (logger.fineEnabled()) {
        logger.fine(" The Evictor Service failed to start.");
      }
    }
    if (logger.fineEnabled()) {
      logger.fine(" The Evictor Service started and its state is " + st);
    }
  }
}
 
源代码3 项目: codebuff   文件: AbstractService.java
@GuardedBy("monitor")
private void stopping(final State from) {
  if (from == State.STARTING) {
    STOPPING_FROM_STARTING_CALLBACK.enqueueOn(listeners);
  } else if (from == State.RUNNING) {
    STOPPING_FROM_RUNNING_CALLBACK.enqueueOn(listeners);
  } else {
    throw new AssertionError();
  }
}
 
源代码4 项目: codebuff   文件: AbstractService.java
@GuardedBy("monitor")
private void stopping(final State from) {
  if (from == State.STARTING) {
    STOPPING_FROM_STARTING_CALLBACK.enqueueOn(listeners);
  } else if (from == State.RUNNING) {
    STOPPING_FROM_RUNNING_CALLBACK.enqueueOn(listeners);
  } else {
    throw new AssertionError();
  }
}
 
源代码5 项目: codebuff   文件: AbstractService.java
@GuardedBy("monitor")
private void stopping(final State from) {
  if (from == State.STARTING) {
    STOPPING_FROM_STARTING_CALLBACK.enqueueOn(listeners);
  } else if (from == State.RUNNING) {
    STOPPING_FROM_RUNNING_CALLBACK.enqueueOn(listeners);
  } else {
    throw new AssertionError();
  }
}
 
源代码6 项目: codebuff   文件: AbstractService.java
@GuardedBy("monitor")
private void stopping(final State from) {
  if (from == State.STARTING) {
    STOPPING_FROM_STARTING_CALLBACK.enqueueOn(listeners);
  } else if (from == State.RUNNING) {
    STOPPING_FROM_RUNNING_CALLBACK.enqueueOn(listeners);
  } else {
    throw new AssertionError();
  }
}
 
源代码7 项目: codebuff   文件: AbstractService.java
@GuardedBy("monitor")
private void stopping(final State from) {
  if (from == State.STARTING) {
    STOPPING_FROM_STARTING_CALLBACK.enqueueOn(listeners);
  } else if (from == State.RUNNING) {
    STOPPING_FROM_RUNNING_CALLBACK.enqueueOn(listeners);
  } else {
    throw new AssertionError();
  }
}
 
源代码8 项目: gemfirexd-oss   文件: AbstractRegion.java
public void initilializeCustomEvictor() {
  LogWriterI18n logger = getSystem().getLogWriter().convertToLogWriterI18n();
  if (getCustomEvictionAttributes() != null
      && !getCustomEvictionAttributes().isEvictIncoming()) {
    State st = getEvictorTask().startAndWait();
    if (st != State.RUNNING) {
      if (logger.fineEnabled()) {
        logger.fine(" The Evictor Service failed to start.");
      }
    }
    if (logger.fineEnabled()) {
      logger.fine(" The Evictor Service started and its state is " + st);
    }
  }
}