Package com.networknt.saga.participant
Class SagaLockManagerImpl
- java.lang.Object
-
- com.networknt.saga.participant.SagaLockManagerImpl
-
- All Implemented Interfaces:
SagaLockManager
public class SagaLockManagerImpl extends Object implements SagaLockManager
-
-
Constructor Summary
Constructors Constructor Description SagaLockManagerImpl(DataSource dataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanclaimLock(String sagaType, String sagaId, String target)protected List<StashedMessage>getStashedMessages(String target)protected intlockAndstashDelete(String queryStr, String input)voidstashMessage(String sagaType, String sagaId, String target, com.networknt.tram.message.common.Message message)protected intstashTableUpdate(String sagaType, String sagaId, String target)Optional<com.networknt.tram.message.common.Message>unlock(String sagaId, String target)
-
-
-
Constructor Detail
-
SagaLockManagerImpl
public SagaLockManagerImpl(DataSource dataSource)
-
-
Method Detail
-
claimLock
public boolean claimLock(String sagaType, String sagaId, String target)
- Specified by:
claimLockin interfaceSagaLockManager
-
stashMessage
public void stashMessage(String sagaType, String sagaId, String target, com.networknt.tram.message.common.Message message)
- Specified by:
stashMessagein interfaceSagaLockManager
-
unlock
public Optional<com.networknt.tram.message.common.Message> unlock(String sagaId, String target)
- Specified by:
unlockin interfaceSagaLockManager
-
getStashedMessages
protected List<StashedMessage> getStashedMessages(String target)
-
-