eu.xtreemos.xosd.utilities.logger.collector
Class Collector
java.lang.Object
eu.xtreemos.xosd.utilities.logger.collector.Collector
public class Collector
- extends java.lang.Object
Contains all readers of log files. The readers are
idetified and accessed by their names.
current implementation is not scalable. all readers write
into single queue. global lock problem.
TODO: each reader holds its own queue, collector just
takes the data out of them.
- Author:
- uros
Field Summary |
(package private) java.util.ArrayList<java.lang.String> |
lines
|
(package private) java.util.Hashtable<java.lang.String,IReader> |
readers
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
readers
java.util.Hashtable<java.lang.String,IReader> readers
lines
java.util.ArrayList<java.lang.String> lines
Collector
public Collector()
readerNameExists
public boolean readerNameExists(java.lang.String name)
addReader
public void addReader(java.lang.String name,
IReader reader)
startReader
public void startReader(java.lang.String name)
stopReader
public void stopReader(java.lang.String name)
- stops reader and removes it from the collector
- Parameters:
name
-
addLine
public void addLine(java.lang.String line)
nextLine
public java.lang.String nextLine()
nextLines
public java.util.ArrayList<java.lang.String> nextLines(int nLines)
hasLines
public boolean hasLines()