Package io.github.factoryfx.factory
Class FactoryManager<L,R extends FactoryBase<L,R>>
- java.lang.Object
-
- io.github.factoryfx.factory.FactoryManager<L,R>
-
- Type Parameters:
R- Root
public class FactoryManager<L,R extends FactoryBase<L,R>> extends java.lang.ObjectManage application lifecycle (start,stop,update)
-
-
Constructor Summary
Constructors Constructor Description FactoryManager(FactoryExceptionHandler factoryExceptionHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RgetCurrentFactory()booleanisStarted()voidresetAfterCrash()MergeDiffInfo<R>simulateUpdate(R commonVersion, R newVersion, java.util.function.Function<java.lang.String,java.lang.Boolean> permissionChecker)get the merge result but don't execute the merge and liveObjects updatesLstart(RootFactoryWrapper<R> newFactory)voidstop()FactoryUpdateLog<R>update(R commonVersion, R newVersion, java.util.function.Function<java.lang.String,java.lang.Boolean> permissionChecker)
-
-
-
Constructor Detail
-
FactoryManager
public FactoryManager(FactoryExceptionHandler factoryExceptionHandler)
-
-
Method Detail
-
update
public FactoryUpdateLog<R> update(R commonVersion, R newVersion, java.util.function.Function<java.lang.String,java.lang.Boolean> permissionChecker)
-
simulateUpdate
public MergeDiffInfo<R> simulateUpdate(R commonVersion, R newVersion, java.util.function.Function<java.lang.String,java.lang.Boolean> permissionChecker)
get the merge result but don't execute the merge and liveObjects updates- Parameters:
commonVersion- commonVersionnewVersion- newVersionpermissionChecker- permissionChecker- Returns:
- MergeDiffInfo
-
getCurrentFactory
public R getCurrentFactory()
-
start
public L start(RootFactoryWrapper<R> newFactory)
-
stop
public void stop()
-
resetAfterCrash
public void resetAfterCrash()
-
isStarted
public boolean isStarted()
-
-