mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge of all UI clustering changes originally applied to 2.2
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,6 +72,21 @@ public class Issuer
|
||||
* After the database is up, get our value.
|
||||
*/
|
||||
public void initialize()
|
||||
{
|
||||
getNextId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue the next number.
|
||||
* @return A serial number.
|
||||
*/
|
||||
public synchronized long issue()
|
||||
{
|
||||
|
||||
return getNextId();
|
||||
}
|
||||
|
||||
private long getNextId()
|
||||
{
|
||||
class TxnWork implements RetryingTransactionCallback<Long>
|
||||
{
|
||||
@@ -89,14 +104,6 @@ public class Issuer
|
||||
{
|
||||
fNext = result + 1L;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue the next number.
|
||||
* @return A serial number.
|
||||
*/
|
||||
public synchronized long issue()
|
||||
{
|
||||
return fNext++;
|
||||
return fNext;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user