public class LockDAOImpl extends AbstractLockDAOImpl
| Constructor and Description |
|---|
LockDAOImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected LockEntity |
createLock(Long sharedResourceId,
Long exclusiveResourceId,
String lockToken,
long timeToLive)
Create a new lock.
|
protected LockResourceEntity |
createLockResource(Long qnameNamespaceId,
String qnameLocalName)
Create a unique lock resource
|
protected LockEntity |
getLock(Long id) |
protected LockEntity |
getLock(Long sharedResourceId,
Long exclusiveResourceId) |
protected LockResourceEntity |
getLockResource(Long qnameNamespaceId,
String qnameLocalName)
Override to get the unique, lock resource entity if one exists.
|
protected List<LockEntity> |
getLocksBySharedResourceIds(List<Long> sharedLockResourceIds)
Get any existing lock data for the shared resources.
|
void |
setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) |
protected LockEntity |
updateLock(LockEntity lockEntity,
String lockToken,
long timeToLive)
Update an existing lock
|
protected int |
updateLocks(Long exclusiveLockResourceId,
String oldLockToken,
String newLockToken,
long timeToLive) |
getLock, getQNameDAO, refreshLock, releaseLock, setQnameDAO, splitLockQNamepublic final void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
protected LockResourceEntity getLockResource(Long qnameNamespaceId, String qnameLocalName)
AbstractLockDAOImplgetLockResource in class AbstractLockDAOImplqnameNamespaceId - the namespace entity IDqnameLocalName - the lock localnameprotected LockResourceEntity createLockResource(Long qnameNamespaceId, String qnameLocalName)
AbstractLockDAOImplcreateLockResource in class AbstractLockDAOImplqnameNamespaceId - the namespace entity IDqnameLocalName - the lock localnameprotected List<LockEntity> getLocksBySharedResourceIds(List<Long> sharedLockResourceIds)
AbstractLockDAOImplgetLocksBySharedResourceIds in class AbstractLockDAOImplsharedLockResourceIds - a list of shared resource IDs for which to retrieve the current locksprotected LockEntity getLock(Long id)
getLock in class AbstractLockDAOImplid - the lock instance IDprotected LockEntity getLock(Long sharedResourceId, Long exclusiveResourceId)
getLock in class AbstractLockDAOImplsharedResourceId - the shared lock resource IDexclusiveResourceId - the exclusive lock resource IDprotected LockEntity createLock(Long sharedResourceId, Long exclusiveResourceId, String lockToken, long timeToLive)
AbstractLockDAOImplcreateLock in class AbstractLockDAOImplsharedResourceId - the specific resource to lockexclusiveResourceId - the exclusive lock that is being soughtlockToken - the lock token to assigntimeToLive - the time, in milliseconds, for the lock to remain validprotected LockEntity updateLock(LockEntity lockEntity, String lockToken, long timeToLive)
AbstractLockDAOImplupdateLock in class AbstractLockDAOImpllockEntity - the specific lock to updatelockToken - the new lock tokentimeToLive - the new lock time, in milliseconds, for the lock to remain validprotected int updateLocks(Long exclusiveLockResourceId, String oldLockToken, String newLockToken, long timeToLive)
updateLocks in class AbstractLockDAOImplexclusiveLockResourceId - the exclusive resource ID being locksoldLockToken - the lock token to change fromnewLockToken - the new lock tokentimeToLive - the new time to live (in milliseconds)Copyright © 2005–2018 Alfresco Software. All rights reserved.