Interface ResourceLockProvider
- All Known Implementing Classes:
- ExternalResourceLockProvider
public interface ResourceLockProvider
Provides the ability to lock and unlock resources.
- Author:
- Jacob Mitash
- 
Method SummaryModifier and TypeMethodDescriptionobtainLock(String contextId, String conceptKey, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Obtains a resource lock.voidreleaseLock(String token, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Releases a resource lock using a token.
- 
Method Details- 
obtainLockString obtainLock(String contextId, String conceptKey, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Obtains a resource lock.- Parameters:
- contextId- the context ID of the entity to lock
- conceptKey- some key indicating what is being locked or by who
- contextInfo- the context of the request
- Returns:
- a token that can be used to release the lock
 
- 
releaseLockvoid releaseLock(String token, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Releases a resource lock using a token. The token should be obtained viaobtainLock(String, String, ContextInfo).- Parameters:
- token- the token tied to the lock which should be released
- contextInfo- the context of the request
 
 
-