|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.callback.logging.LogTemplate<C>
org.javasimon.callback.logging.DelegateLogTemplate<C>
org.javasimon.callback.logging.CounterLogTemplate<C>
public class CounterLogTemplate<C>
Log template that logs something every N invocations of the isEnabled(Object) method.
| Field Summary | |
|---|---|
private int |
counter
Counter value |
private int |
counterMax
Counter max value corresponds to N value |
| Constructor Summary | |
|---|---|
CounterLogTemplate(LogTemplate delegate,
int counterMax)
Constructor |
|
| Method Summary | |
|---|---|
int |
getCounter()
Get counter value |
int |
getCounterMax()
Get counter max value, corresponding to logging period |
private boolean |
incrementCounter()
Increment counter |
boolean |
isEnabled(C context)
Tell whether logging is enabled. |
void |
log(String message)
Log a message. |
| Methods inherited from class org.javasimon.callback.logging.DelegateLogTemplate |
|---|
getDelegate |
| 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 |
|---|
private final int counterMax
private int counter
| Constructor Detail |
|---|
public CounterLogTemplate(LogTemplate delegate,
int counterMax)
delegate - Concrete log templatecounterMax - Logging period| Method Detail |
|---|
public int getCounterMax()
public int getCounter()
private boolean incrementCounter()
public boolean isEnabled(C context)
isEnabled in class DelegateLogTemplate<C>public void log(String message)
log in class DelegateLogTemplate<C>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||