mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
91057: Merged V4.2-BUG-FIX (4.2.5) to HEAD-BUG-FIX (5.0/Cloud) 90986: MNT-11732: ephemeral locks have configurable threshold over which locks will be automatically made persistent instead. By setting the new property, administrators may control how ephemeral locks are created, for example: property alfresco.ephemeralLock.expiryThresh=30 This will mean that when a LockService client requests that an ephemeral lock is created with a timeout of greater than 30 seconds, the lock will be created as a persistent lock instead (the ephemeral lifetime request is vetoed). By setting this property to -1, ALL locks will be created as persistent locks (giving the old, pre-ephemeral locking behaviour). By leaving this at the default (48 hours) the newer locking behaviour is completely unaffected, e.g. ephemeral locks may be created with up to 48 hour expiry time and over this limit an exception is thrown (and the lock is not created). By setting the value to something in between these settings it is possible to have quite a nice balance of behaviour. Using the example of 30 seconds, as above, will mean that using Share's "Edit Online" to edit a document in MS Word will result in a persistent lock (as MS Word requests approx 1 hour for its locks). After Solr has performed its next incremental index, then the Word document may be seen in the "Document's I'm Editing" filter in Share, since this is a persistent (in-DB) lock. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94765 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,14 +19,12 @@
|
||||
package org.alfresco.service.cmr.lock;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.repo.lock.mem.Lifetime;
|
||||
import org.alfresco.repo.lock.mem.LockState;
|
||||
import org.alfresco.service.Auditable;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
|
||||
|
||||
/**
|
||||
@@ -363,4 +361,13 @@ public interface LockService
|
||||
* @return LockState
|
||||
*/
|
||||
public LockState getLockState(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Specifies the maximum expiry time for which a request for an ephemeral lock
|
||||
* will be honoured. Requests for ephemeral locks with expiry times greater than
|
||||
* this value will be automatically converted to a request for a persistent lock.
|
||||
*
|
||||
* @param threshSecs
|
||||
*/
|
||||
public void setEphemeralExpiryThreshold(int threshSecs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user