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, splitLockQName
public final void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
protected LockResourceEntity getLockResource(Long qnameNamespaceId, String qnameLocalName)
AbstractLockDAOImpl
getLockResource
in class AbstractLockDAOImpl
qnameNamespaceId
- the namespace entity IDqnameLocalName
- the lock localnameprotected LockResourceEntity createLockResource(Long qnameNamespaceId, String qnameLocalName)
AbstractLockDAOImpl
createLockResource
in class AbstractLockDAOImpl
qnameNamespaceId
- the namespace entity IDqnameLocalName
- the lock localnameprotected List<LockEntity> getLocksBySharedResourceIds(List<Long> sharedLockResourceIds)
AbstractLockDAOImpl
getLocksBySharedResourceIds
in class AbstractLockDAOImpl
sharedLockResourceIds
- a list of shared resource IDs for which to retrieve the current locksprotected LockEntity getLock(Long id)
getLock
in class AbstractLockDAOImpl
id
- the lock instance IDprotected LockEntity getLock(Long sharedResourceId, Long exclusiveResourceId)
getLock
in class AbstractLockDAOImpl
sharedResourceId
- the shared lock resource IDexclusiveResourceId
- the exclusive lock resource IDprotected LockEntity createLock(Long sharedResourceId, Long exclusiveResourceId, String lockToken, long timeToLive)
AbstractLockDAOImpl
createLock
in class AbstractLockDAOImpl
sharedResourceId
- 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)
AbstractLockDAOImpl
updateLock
in class AbstractLockDAOImpl
lockEntity
- 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 AbstractLockDAOImpl
exclusiveLockResourceId
- 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–2017 Alfresco Software. All rights reserved.