org.ow2.jonas.lib.jmbeans.log
Class RecordFeeder
java.lang.Object
org.ow2.jonas.lib.jmbeans.log.RecordFeeder
- All Implemented Interfaces:
- Runnable
public class RecordFeeder
- extends Object
- implements Runnable
- Author:
- waeselyf
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RecordFeeder
public RecordFeeder(LinkedList queue,
TreeSet recordSet)
- Construct the LogBuffer's
recordSet
feeder.
The feeder extracts maxRecFerch records from the LogRecords source
and adds them to the records
TreeSet.
- Parameters:
queue
- source of LogRecordsrecordSet
- LogRecords TreeSet to update
run
public void run()
- Specified by:
run
in interface Runnable
readRecords
public LogRecord[] readRecords()
- Read from the source queue Waits for a while if necessary A post is
assumed to notify the thread.
- Returns:
- an array of records containing maximum maxRecFetch LogRecord extracted from
the source queue, or null if the thread is interrupted
setMaxRecords
public void setMaxRecords(int max)
getMaxRecords
public int getMaxRecords()
setMaxRecFetch
public void setMaxRecFetch(int max)
getMaxRecFetch
public int getMaxRecFetch()
Copyright © 2010 OW2 Consortium. All Rights Reserved.