Class ClockFactoryImpl
java.lang.Object
net.officefloor.frame.impl.execute.clock.ClockFactoryImpl
- All Implemented Interfaces:
ClockFactory,BackgroundScheduling
ClockFactory implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Clock<T>createClock(Function<Long, T> translator) Creates aClock.protected longObtains the current time in seconds since Epoch.voidstartBackgroundScheduling(BackgroundScheduler scheduler) Starts theBackgroundScheduling.
-
Constructor Details
-
ClockFactoryImpl
public ClockFactoryImpl()
-
-
Method Details
-
currentTimeSeconds
protected long currentTimeSeconds()Obtains the current time in seconds since Epoch.- Returns:
- Current time in seconds since Epoch.
-
createClock
Description copied from interface:ClockFactoryCreates aClock.- Specified by:
createClockin interfaceClockFactory- Type Parameters:
T- Type of time.- Parameters:
translator- Translate the seconds since Epoch toClocktime.- Returns:
Clock.
-
startBackgroundScheduling
Description copied from interface:BackgroundSchedulingStarts theBackgroundScheduling.- Specified by:
startBackgroundSchedulingin interfaceBackgroundScheduling- Parameters:
scheduler-BackgroundScheduler.
-