org.javasimon.callback.logging
Class SplitThresholdLogTemplate

java.lang.Object
  extended by org.javasimon.callback.logging.LogTemplate<C>
      extended by org.javasimon.callback.logging.DelegateLogTemplate<Split>
          extended by org.javasimon.callback.logging.SplitThresholdLogTemplate

public class SplitThresholdLogTemplate
extends DelegateLogTemplate<Split>

Log template which awakes only when split is longer than given threshold.

Author:
gquintana

Field Summary
private  long threshold
          Split duration theshold
 
Constructor Summary
SplitThresholdLogTemplate(LogTemplate delegate, long threshold)
          Constructor
 
Method Summary
 long getThreshold()
           
 boolean isEnabled(Split split)
          Tell whether logging is enabled.
 
Methods inherited from class org.javasimon.callback.logging.DelegateLogTemplate
getDelegate, log
 
Methods inherited from class org.javasimon.callback.logging.LogTemplate
log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threshold

private final long threshold
Split duration theshold

Constructor Detail

SplitThresholdLogTemplate

public SplitThresholdLogTemplate(LogTemplate delegate,
                                 long threshold)
Constructor

Parameters:
delegate - Concreate log template
threshold - Theshold
Method Detail

isEnabled

public boolean isEnabled(Split split)
Description copied from class: DelegateLogTemplate
Tell whether logging is enabled.

Overrides:
isEnabled in class DelegateLogTemplate<Split>
Returns:
Logging enabled

getThreshold

public long getThreshold()


Copyright © 2013. All Rights Reserved.