org.sonar.batch
Class DefaultResourceCreationLock
java.lang.Object
org.sonar.batch.DefaultResourceCreationLock
- All Implemented Interfaces:
- ResourceCreationLock, BatchComponent
public final class DefaultResourceCreationLock
- extends Object
- implements ResourceCreationLock
This lock is used to ensure that Sonar resources (files, packages, directories) are not created by buggy plugins
when saving measures/violations on unknown resources.
- Since:
- 2.3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultResourceCreationLock
public DefaultResourceCreationLock()
DefaultResourceCreationLock
public DefaultResourceCreationLock(org.apache.commons.configuration.Configuration configuration)
isLocked
public boolean isLocked()
lock
public void lock()
- Description copied from interface:
ResourceCreationLock
- Forbids the creation of resources when saving violations and measures. By default it's unlocked, so only warnings
are logged. When locked, then an exception is thrown.
- Specified by:
lock
in interface ResourceCreationLock
unlock
public void unlock()
- Unlocking is for internal use only.
isFailWhenLocked
public boolean isFailWhenLocked()
setFailWhenLocked
public void setFailWhenLocked(boolean b)
Copyright © 2009-2012 SonarSource. All Rights Reserved.