Examples of TimeService


Examples of gov.nasa.arc.mct.services.activity.TimeService

        {false,false,false,1}       
    };
  }
 
  private TimeService makeStaticTimeService(final long time) {
    return new TimeService() {
      @Override
      public long getCurrentTime() {
        return time;
      }
    };
View Full Code Here

Examples of gov.nasa.arc.mct.services.activity.TimeService

   
    manifestation.getViewProperties().setProperty(PlotConstants.TIME_SYSTEM_SETTING, setting);
   
    List<FeedProvider> fps = new ArrayList<FeedProvider>();
    for (String timeSys : TEST_TIME_SYSTEMS) {
      TimeService ts = Mockito.mock(TimeService.class);
      Mockito.when(ts.getTimeSystemId()).thenReturn(timeSys);
      FeedProvider fp = Mockito.mock(FeedProvider.class);
      Mockito.when(fp.getTimeService()).thenReturn(ts);     
      fps.add(fp);
    }
   
View Full Code Here

Examples of gov.nasa.arc.mct.services.activity.TimeService

   
    for (int r = 0 ; r < rows ; r++) {
      result[r] = new AbstractComponent[cols];
      for (int c = 0 ; c < cols ; c++) {
        FeedProvider fp      = Mockito.mock(FeedProvider.class);
        TimeService  ts      = Mockito.mock(TimeService.class);
        AbstractComponent ac = Mockito.mock(AbstractComponent.class);
        Mockito.when(ac.isLeaf()).thenReturn(true);
        Mockito.when(ac.getCapability(FeedProvider.class)).thenReturn(fp);
        Mockito.when(fp.getTimeService()).thenReturn(ts);
        Mockito.when(fp.isPrediction()).thenReturn(false);
        Mockito.when(ts.getTimeSystems()).thenReturn(multiTS ? timeSystems : new String[]{timeSystems[r]});
        Mockito.when(ts.getTimeFormats()).thenReturn(multiTF ? timeFormats : new String[]{timeFormats[c]});
        result[r][c] = ac;
      }
    }
   
    return result;
View Full Code Here

Examples of org.infinispan.util.TimeService

    * @throws InterruptedException  if interrupted while waiting
    * @throws IllegalStateException if even after waiting the cache has not started.
    */
   private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException {
      int pollFrequencyMS = 20;
      TimeService timeService = getTimeService();
      final long startupWaitTime = getConfiguration().clustering().stateTransfer().timeout();
      final long giveUpTime = timeService.expectedEndTime(startupWaitTime, TimeUnit.MILLISECONDS);

      while (!timeService.isTimeExpired(giveUpTime)) {
         if (state.allowInvocations()) break;
         Thread.sleep(pollFrequencyMS);
      }

      // check if we have started.
View Full Code Here

Examples of org.infinispan.util.TimeService

    * @throws InterruptedException  if interrupted while waiting
    * @throws IllegalStateException if even after waiting the cache has not started.
    */
   private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException {
      int pollFrequencyMS = 20;
      TimeService timeService = getTimeService();
      final long startupWaitTime = getConfiguration().getStateRetrievalTimeout();
      final long giveUpTime = timeService.expectedEndTime(startupWaitTime, TimeUnit.MILLISECONDS);

      while (!timeService.isTimeExpired(giveUpTime)) {
         if (state.allowInvocations()) break;
         Thread.sleep(pollFrequencyMS);
      }

      // check if we have started.
View Full Code Here

Examples of org.infinispan.util.TimeService

    * @throws InterruptedException  if interrupted while waiting
    * @throws IllegalStateException if even after waiting the cache has not started.
    */
   private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException {
      int pollFrequencyMS = 20;
      TimeService timeService = getTimeService();
      final long startupWaitTime = getConfiguration().clustering().stateTransfer().timeout();
      final long giveUpTime = timeService.expectedEndTime(startupWaitTime, TimeUnit.MILLISECONDS);

      while (!timeService.isTimeExpired(giveUpTime)) {
         if (state.allowInvocations()) break;
         Thread.sleep(pollFrequencyMS);
      }

      // check if we have started.
View Full Code Here

Examples of org.infinispan.util.TimeService

    * @throws InterruptedException  if interrupted while waiting
    * @throws IllegalStateException if even after waiting the cache has not started.
    */
   private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException {
      int pollFrequencyMS = 20;
      TimeService timeService = getTimeService();
      final long startupWaitTime = getConfiguration().clustering().stateTransfer().timeout();
      final long giveUpTime = timeService.expectedEndTime(startupWaitTime, TimeUnit.MILLISECONDS);

      while (!timeService.isTimeExpired(giveUpTime)) {
         if (state.allowInvocations()) break;
         Thread.sleep(pollFrequencyMS);
      }

      // check if we have started.
View Full Code Here

Examples of org.infinispan.util.TimeService

    * @throws InterruptedException  if interrupted while waiting
    * @throws IllegalStateException if even after waiting the cache has not started.
    */
   private void blockUntilCacheStarts() throws InterruptedException, IllegalStateException {
      int pollFrequencyMS = 20;
      TimeService timeService = getTimeService();
      final long startupWaitTime = getConfiguration().getStateRetrievalTimeout();
      final long giveUpTime = timeService.expectedEndTime(startupWaitTime, TimeUnit.MILLISECONDS);

      while (!timeService.isTimeExpired(giveUpTime)) {
         if (state.allowInvocations()) break;
         Thread.sleep(pollFrequencyMS);
      }

      // check if we have started.
View Full Code Here

Examples of org.jgroups.util.TimeService

public class TimeServiceTest {
    protected TimeScheduler timer;
    protected TimeService   time_service;

    @BeforeClass  public void init()    {timer=new TimeScheduler3();}
    @BeforeMethod public void start()   {time_service=new TimeService(timer).start();}
View Full Code Here

Examples of org.omg.CosTime.TimeService

        ORB orb = (ORB) container.getComponentInstanceOfType(ORB.class);

        MutablePicoContainer tempContainer = new DefaultPicoContainer(container);
        try
        {
            TimeService timeService = TimeServiceHelper.narrow(orb.resolve_initial_references("TimeService"));
            tempContainer.registerComponent(new CORBAObjectComponentAdapter(TimeService.class, timeService));
        } catch (Exception e)
        {
            // ignored
        }
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.