org.sonar.batch.index
Class MemoryOptimizer

java.lang.Object
  extended by org.sonar.batch.index.MemoryOptimizer
All Implemented Interfaces:
DecoratorExecutionHandler, DecoratorsPhaseHandler, EventHandler, SensorExecutionHandler, BatchComponent, BatchExtension, Extension

public class MemoryOptimizer
extends Object
implements SensorExecutionHandler, DecoratorExecutionHandler, DecoratorsPhaseHandler

Since:
2.7

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.events.SensorExecutionHandler
SensorExecutionHandler.SensorExecutionEvent
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.events.DecoratorExecutionHandler
DecoratorExecutionHandler.DecoratorExecutionEvent
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.events.DecoratorsPhaseHandler
DecoratorsPhaseHandler.DecoratorsPhaseEvent
 
Constructor Summary
MemoryOptimizer(DatabaseSession session)
           
 
Method Summary
 void evictDataMeasure(Measure measure, MeasureModel model)
          Remove data of a database measure from memory.
 void flushMemory()
           
 void onDecoratorExecution(DecoratorExecutionHandler.DecoratorExecutionEvent event)
          Called before and after execution of Decorator.
 void onDecoratorsPhase(DecoratorsPhaseHandler.DecoratorsPhaseEvent event)
          Called before and after execution of all Decorators.
 void onSensorExecution(SensorExecutionHandler.SensorExecutionEvent event)
          Called before and after execution of Sensor.
 Measure reloadMeasure(Measure measure)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryOptimizer

public MemoryOptimizer(DatabaseSession session)
Method Detail

evictDataMeasure

public void evictDataMeasure(Measure measure,
                             MeasureModel model)
Remove data of a database measure from memory.


reloadMeasure

public Measure reloadMeasure(Measure measure)

flushMemory

public void flushMemory()

onSensorExecution

public void onSensorExecution(SensorExecutionHandler.SensorExecutionEvent event)
Description copied from interface: SensorExecutionHandler
Called before and after execution of Sensor.

Specified by:
onSensorExecution in interface SensorExecutionHandler

onDecoratorExecution

public void onDecoratorExecution(DecoratorExecutionHandler.DecoratorExecutionEvent event)
Description copied from interface: DecoratorExecutionHandler
Called before and after execution of Decorator.

Specified by:
onDecoratorExecution in interface DecoratorExecutionHandler

onDecoratorsPhase

public void onDecoratorsPhase(DecoratorsPhaseHandler.DecoratorsPhaseEvent event)
Description copied from interface: DecoratorsPhaseHandler
Called before and after execution of all Decorators.

Specified by:
onDecoratorsPhase in interface DecoratorsPhaseHandler


Copyright © 2009-2012 SonarSource. All Rights Reserved.