|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.logging.LoggerCache
public class LoggerCache
provides a simple mechanism to cache LogEntries from a Logger
| Field Summary |
|---|
| Fields inherited from interface com.antelmann.util.Filter |
|---|
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER |
| Constructor Summary | |
|---|---|
LoggerCache()
uses a size of 10 |
|
LoggerCache(int cacheSize)
|
|
| Method Summary | |
|---|---|
boolean |
accept(LogEntry entry)
returns true only if the given entry is accepted by this filter |
LogEntry[] |
getCache()
always returns an array of the size of the cache with the current content where the first element is the latest |
int |
getCacheSize()
|
Filter<? super LogEntry> |
getFilter()
|
void |
setCacheSize(int cacheSize)
|
void |
setFilter(Filter<? super LogEntry> filter)
|
void |
write(LogEntry entry)
writes the given LogEntry to the log of this LogWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggerCache()
public LoggerCache(int cacheSize)
| Method Detail |
|---|
public int getCacheSize()
public void setCacheSize(int cacheSize)
public void write(LogEntry entry)
throws LogException
LogWriter
write in interface LogWriterLogException - if an error occurred while writing the logpublic LogEntry[] getCache()
public Filter<? super LogEntry> getFilter()
public void setFilter(Filter<? super LogEntry> filter)
public boolean accept(LogEntry entry)
Filter
accept in interface Filter<LogEntry>
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||