Class RepoUsageMonitor

java.lang.Object
org.alfresco.repo.usage.RepoUsageMonitor
All Implemented Interfaces:
RepoUsageComponent.RestrictionObserver

public class RepoUsageMonitor extends Object implements RepoUsageComponent.RestrictionObserver
This component monitors the repository usages, issuing warnings and errors as necessary.
Since:
3.5
Author:
Derek Hulley
  • Field Details

    • LOCK_TTL

      public static final Long LOCK_TTL
    • LOCK_USAGE

      public static final QName LOCK_USAGE
  • Constructor Details

    • RepoUsageMonitor

      public RepoUsageMonitor()
  • Method Details

    • setScheduler

      public void setScheduler(org.quartz.Scheduler scheduler)
      Parameters:
      scheduler - Timed updates
    • setTransactionService

      public void setTransactionService(TransactionService transactionService)
      Parameters:
      transactionService - service that tells if the server is read-only or not
    • setRepoUsageComponent

      public void setRepoUsageComponent(RepoUsageComponent repoUsageComponent)
      Parameters:
      repoUsageComponent - provides data on usages
    • setJobLockService

      public void setJobLockService(JobLockService jobLockService)
      Parameters:
      jobLockService - service to prevent duplicate work when updating usages
    • init

      public void init() throws org.quartz.SchedulerException
      Check that all properties are properly set
      Throws:
      org.quartz.SchedulerException
    • checkUsages

      public void checkUsages()
      Performs the physical checking of usages.
    • onChangeRestriction

      public void onChangeRestriction(RepoUsage restrictions)
      Checks the current status, logs messages and sets a read-write veto, if necessary
      Specified by:
      onChangeRestriction in interface RepoUsageComponent.RestrictionObserver
      Parameters:
      restrictions - the new restrictions