public class LogTableDataModel extends LogEntryTableModelBase
LogEntryTableModelBase adding I/O, deletion of logs
by time frame.LogEntryTableModelBase,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
java.io.File |
currentDir
Contains references to the filters that are currently applied to logs.
|
allLogs, loggingClient, rows, tableUpdater| Constructor and Description |
|---|
LogTableDataModel(LoggingClient client)
LogTableDataModel constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean sync)
Closes all the threads and frees the resources
This is the last method to call before closing the application
|
int |
getFieldSortNumber() |
boolean |
getSuspended()
Returns whether the saving/loading of the file has been cancelled or not that reflects on the
status of the JToggleButton of the GUI.
|
boolean |
IOInProgress()
Return true if an async load/save is in progress
|
void |
loadFromFile(java.lang.String fileName)
Loads logs from a file.
|
void |
loadFromURL() |
void |
saveFile()
Saves input logs into a file.
|
void |
setSortComparator(int index,
boolean ascending) |
void |
setTimeFrame(long timeframe)
Set the time frame of the logs in the cache
The time frame if the amount of time we want to keep in the table
for example the last 2hr
(the visible logs can be less)
|
boolean |
sortedAscending() |
void |
start()
Start the thread to remove oldest logs
|
appendLog, clearAll, findKeyPos, getColumnClass, getColumnCount, getColumnName, getLogKey, getRowCount, getTimeFrame, getValueAt, getVisibleLogEntry, numberOfUsedFiles, replaceLog, run, setMaxLog, totalLogNumber, usedDiskSpaceaddTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtpublic java.io.File currentDir
public LogTableDataModel(LoggingClient client) throws java.lang.Exception
java.lang.Exceptionpublic final boolean getSuspended()
public void setTimeFrame(long timeframe)
timeframe - The time frame in milliseconds
0 means unlimitedpublic void loadFromURL()
public void loadFromFile(java.lang.String fileName)
filename - The name of the file to loadpublic void saveFile()
public boolean IOInProgress()
public void close(boolean sync)
close in class LogEntryTableModelBasesync - If it is true wait the termination of the threads before returningpublic void start()
start in class LogEntryTableModelBaseLogEntryTableModelBase#tableUpdater}public int getFieldSortNumber()
public boolean sortedAscending()
public void setSortComparator(int index,
boolean ascending)