com.streambase.sb.unittest

## Class TimeServiceFactory

- java.lang.Object
- - com.streambase.sb.unittest.TimeServiceFactory

-     public class TimeServiceFactory
      extends Object

  Contains static methods for creating concrete `TimeService`
  Since:
    7.4

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimeServiceFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TimeService` | `getControllableTimeService()` Deprecated. Use `ControllableTimeService` to obtain a TimeService
    `static TimeService` | `getControllableTimeService(long initTargetTimeMsec)` Return `ControllableTimeService` instance initialized with the time specified in initTargetTimeMsec
    `static TimeService` | `getWallClockTimeService()` Deprecated. Use `WallClockTimeService` to obtain a TimeService

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TimeServiceFactory

          public TimeServiceFactory()

  - ### Method Detail

    - #### getWallClockTimeService

          @Deprecated
          public static TimeService getWallClockTimeService()

      Deprecated. Use `WallClockTimeService` to obtain a TimeService
      Return `WallClockTimeService` instance. This class uses the system clock internally
      Returns:
        WallClockTimeService object

    - #### getControllableTimeService

          @Deprecated
          public static TimeService getControllableTimeService()

      Deprecated. Use `ControllableTimeService` to obtain a TimeService
      Return `ControllableTimeService` instance initialized with the current system time
      Returns:
        ControllableTimeService object

    - #### getControllableTimeService

          public static TimeService getControllableTimeService(long initTargetTimeMsec)

      Return `ControllableTimeService` instance initialized with the time specified in initTargetTimeMsec
      Parameters:
        `initTargetTimeMsec` - Initial time of the TimeService in milliseconds
      Returns:
        ControllableTimeService object

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.