mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
JobLockService implementation
- Provides transaction-aware locking - Post-transaction cleanup is automatically done - Retrying for lock acquisition is handled internally as well - Downgraded the lock concurrency tests for the build machine (maybe 50 threads was too much) - Deadlock tests added for the high-level locking git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13968 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,7 +40,7 @@ import org.alfresco.repo.domain.hibernate.NamespaceEntityImpl;
|
||||
* @author David Caruana
|
||||
*
|
||||
*/
|
||||
public final class QName implements QNamePattern, Serializable, Cloneable
|
||||
public final class QName implements QNamePattern, Serializable, Cloneable, Comparable<QName>
|
||||
{
|
||||
private static final long serialVersionUID = 3977016258204348976L;
|
||||
|
||||
@@ -348,7 +348,22 @@ public final class QName implements QNamePattern, Serializable, Cloneable
|
||||
.append(localName).toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Uses the {@link #getNamespaceURI() namespace URI} and then the {@link #getLocalName() localname}
|
||||
* to do the comparison i.e. the comparison is alphabetical.
|
||||
*/
|
||||
public int compareTo(QName qname)
|
||||
{
|
||||
int namespaceComparison = this.namespaceURI.compareTo(qname.namespaceURI);
|
||||
if (namespaceComparison != 0)
|
||||
{
|
||||
return namespaceComparison;
|
||||
}
|
||||
// Namespaces are the same. Do comparison on localname
|
||||
return this.localName.compareTo(qname.localName);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render string representation of QName using format:
|
||||
*
|
||||
|
Reference in New Issue
Block a user