mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-4551: DeletedNodeCleanupWorker will throw UnsupportedOperationException
- Included unit test to start NodeCleanupRegistry (sanity check only) - DAO call to 'purgeNodes' - Add job locking to cleanup tasks git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22255 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1526,13 +1526,10 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
}
|
||||
}
|
||||
|
||||
public void purgeNode(Long nodeId)
|
||||
@Override
|
||||
public int purgeNodes(long maxTxnCommitTimeMs)
|
||||
{
|
||||
int count = deleteNodeById(nodeId, true);
|
||||
if (count != 1)
|
||||
{
|
||||
throw new ConcurrencyFailureException("Failed to purge node: " + nodeId);
|
||||
}
|
||||
return deleteNodesByCommitTime(true, maxTxnCommitTimeMs);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3046,15 +3043,6 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
return (txn == null ? null : txn.getId());
|
||||
}
|
||||
|
||||
public void getNodesDeletedInOldTxns(
|
||||
Long minNodeId,
|
||||
long maxCommitTime,
|
||||
int count,
|
||||
NodeRefQueryCallback resultsCallback)
|
||||
{
|
||||
selectNodesDeletedInOldTxns(minNodeId, maxCommitTime, count, resultsCallback);
|
||||
}
|
||||
|
||||
public int getTransactionCount()
|
||||
{
|
||||
return selectTransactionCount();
|
||||
@@ -3170,6 +3158,7 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
Long optionalOldSharedAlcIdInAdditionToNull,
|
||||
Long newSharedAlcId);
|
||||
protected abstract int deleteNodeById(Long nodeId, boolean deletedOnly);
|
||||
protected abstract int deleteNodesByCommitTime(boolean deletedOnly, long maxTxnCommitTimeMs);
|
||||
protected abstract NodeEntity selectNodeById(Long id, Boolean deleted);
|
||||
protected abstract NodeEntity selectNodeByNodeRef(NodeRef nodeRef, Boolean deleted);
|
||||
protected abstract List<NodeEntity> selectNodesByUuids(Long storeId, SortedSet<String> uuids);
|
||||
@@ -3267,11 +3256,6 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
|
||||
String childNodeName);
|
||||
|
||||
protected abstract Transaction selectLastTxnBeforeCommitTime(Long maxCommitTime);
|
||||
protected abstract void selectNodesDeletedInOldTxns(
|
||||
Long minNodeId,
|
||||
Long maxCommitTime,
|
||||
Integer count,
|
||||
NodeRefQueryCallback resultsCallback);
|
||||
protected abstract int selectTransactionCount();
|
||||
protected abstract Transaction selectTxnById(Long txnId);
|
||||
protected abstract List<NodeEntity> selectTxnChanges(Long txnId, Long storeId);
|
||||
|
Reference in New Issue
Block a user