Package org.alfresco.repo.usage
Class RepoUsageMonitor
java.lang.Object
org.alfresco.repo.usage.RepoUsageMonitor
- All Implemented Interfaces:
RepoUsageComponent.RestrictionObserver
This component monitors the repository usages, issuing warnings and errors
as necessary.
- Since:
- 3.5
- Author:
- Derek Hulley
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe job that kicks off the usage monitoring. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerforms the physical checking of usages.voidinit()Check that all properties are properly setvoidonChangeRestriction(RepoUsage restrictions) Checks the current status, logs messages and sets a read-write veto, if necessaryvoidsetJobLockService(JobLockService jobLockService) voidsetRepoUsageComponent(RepoUsageComponent repoUsageComponent) voidsetScheduler(org.quartz.Scheduler scheduler) voidsetTransactionService(TransactionService transactionService)
-
Field Details
-
LOCK_TTL
-
LOCK_USAGE
-
-
Constructor Details
-
RepoUsageMonitor
public RepoUsageMonitor()
-
-
Method Details
-
setScheduler
public void setScheduler(org.quartz.Scheduler scheduler) - Parameters:
scheduler- Timed updates
-
setTransactionService
- Parameters:
transactionService- service that tells if the server is read-only or not
-
setRepoUsageComponent
- Parameters:
repoUsageComponent- provides data on usages
-
setJobLockService
- Parameters:
jobLockService- service to prevent duplicate work when updating usages
-
init
public void init() throws org.quartz.SchedulerExceptionCheck that all properties are properly set- Throws:
org.quartz.SchedulerException
-
checkUsages
public void checkUsages()Performs the physical checking of usages. -
onChangeRestriction
Checks the current status, logs messages and sets a read-write veto, if necessary- Specified by:
onChangeRestrictionin interfaceRepoUsageComponent.RestrictionObserver- Parameters:
restrictions- the new restrictions
-