com.tivoli.jflt.buffering
Class CircularBufferAdapter
java.lang.Object
|
+--com.tivoli.jflt.buffering.CircularBufferAdapter
- public class CircularBufferAdapter
- extends java.lang.Object
- implements LogAdapter
This JFLT specialization is used for buffering logging messages into a
circular buffer. It does not write messages into a logging toolkit or
directly to a specific output device.
- Version:
- 1.1
- Author:
- Raimondo Castino, Cosimo Vampo
- See Also:
- Serialized Form
Method Summary |
void |
dumpQueue(LogAdapter adapter)
Dumps the contents of the circular buffer writing the log items to the
adapter's output device. |
boolean |
isLogging()
Determines if this adapter is logging data (true ) or not
(false ). |
void |
log(LogItem item)
Adds the specified LogItem object in the circular buffer. |
void |
log(long type,
java.lang.Object className,
java.lang.String methodName,
java.lang.String text)
Adds the specified text message to the circular buffer. |
void |
setLogging(boolean flag)
Sets a flag that indicates whether this adapter is logging data (true
) or not (false ). |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CircularBufferAdapter
public CircularBufferAdapter()
- Creates a new
CircularBufferAdapter
.
log
public void log(LogItem item)
- Adds the specified
LogItem
object in the circular buffer.
- Specified by:
- log in interface LogAdapter
log
public void log(long type,
java.lang.Object className,
java.lang.String methodName,
java.lang.String text)
- Adds the specified text message to the circular buffer.
dumpQueue
public void dumpQueue(LogAdapter adapter)
- Dumps the contents of the circular buffer writing the log items to the
adapter's output device.
- Specified by:
- dumpQueue in interface LogAdapter
- Parameters:
adapter
- The LogAdapter
on which writing the buffered
log items.
isLogging
public boolean isLogging()
- Determines if this adapter is logging data (
true
) or not
(false
).
setLogging
public void setLogging(boolean flag)
- Sets a flag that indicates whether this adapter is logging data (
true
) or not (false
).