org.alfresco.repo.avm
Class OrphanReaper

java.lang.Object
  extended by org.alfresco.repo.avm.OrphanReaper

public class OrphanReaper
extends java.lang.Object

This is the background thread for reaping no longer referenced nodes in the AVM repository. These orphans arise from purge operations.


Constructor Summary
OrphanReaper()
          Create one with default parameters.
 
Method Summary
 void activate()
          This is really for debugging and testing.
 void doBatch()
          Do a batch of cleanup work.
 void execute()
           
 boolean isActive()
          See if the reaper is actively reaping.
 void setActiveBaseSleep(long interval)
          Set the active base sleep interval.
 void setBatchSize(int size)
          Set the batch size.
 void setJobLockService(JobLockService jobLockService)
           
 void setTransactionService(TransactionService transactionService)
          Set the transaction service.
 void shutDown()
          Shutdown the reaper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrphanReaper

public OrphanReaper()
Create one with default parameters.

Method Detail

execute

public void execute()

setActiveBaseSleep

public void setActiveBaseSleep(long interval)
Set the active base sleep interval.

Parameters:
interval - The interval to set in ms.

setBatchSize

public void setBatchSize(int size)
Set the batch size.

Parameters:
size - The batch size to set.

setTransactionService

public void setTransactionService(TransactionService transactionService)
Set the transaction service.

Parameters:
transactionService - The service.

setJobLockService

public void setJobLockService(JobLockService jobLockService)
Parameters:
jobLockService - service used to ensure that reaper runs are not duplicated

shutDown

public void shutDown()
Shutdown the reaper. This needs to be called when the application shuts down.


activate

public void activate()
This is really for debugging and testing. Allows another thread to mark the orphan reaper busy so that it can monitor for it's being done.


isActive

public boolean isActive()
See if the reaper is actively reaping.

Returns:
Whether this is actively reaping.

doBatch

public void doBatch()
Do a batch of cleanup work.



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.