public class CompositeUnitOfWorkFactory extends Object implements UnitOfWorkFactory
UnitOfWorkFactory that combines multiple instances to behave as a single.UnitOfWorkFactoryImpl,
JpaUnitOfWorkFactoryImplLOG| Constructor and Description |
|---|
CompositeUnitOfWorkFactory(Collection<UnitOfWorkFactory> members) |
| Modifier and Type | Method and Description |
|---|---|
<T> Callable<T> |
create(Callable<T> callable)
Wraps a Callable into a unit of work.
|
Runnable |
create(Runnable runnable)
Wraps a Runnable into a unit of work.
|
void |
restart()
When called, this will close and restart all units of work attached to the current thread.
|
UnitOfWork |
start()
Starts a new unit of work.
|
void |
stop()
Stops a new unit of work.
|
public CompositeUnitOfWorkFactory(Collection<UnitOfWorkFactory> members)
public Runnable create(Runnable runnable)
create in interface UnitOfWorkFactoryrunnable - Original runnable instance.public <T> Callable<T> create(Callable<T> callable)
create in interface UnitOfWorkFactoryT - the result type of the method callcallable - Original callable instance.public void restart()
restart in interface UnitOfWorkFactorypublic UnitOfWork start()
start in interface UnitOfWorkFactorypublic void stop()
stop in interface UnitOfWorkFactoryCopyright © 2020. All rights reserved.