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