Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

alma::acs::logging::table::LogTableDataModel Class Reference

Inheritance diagram for alma::acs::logging::table::LogTableDataModel:

Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::table::LogTableDataModel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

final boolean getSuspended ()
 LogTableDataModel (LoggingClient client) throws Exception
void setMaxLog (int max)
void setTimeFrame (long timeframe)
void loadFromURL ()
void loadFromFile (String fileName)
void saveFile ()
boolean IOInProgress ()
void close (boolean sync)
int getFieldSortNumber ()
boolean sortedAscending ()
void setSortComparator (int index, boolean ascending)

Public Attributes

File currentDir = null

Private Member Functions

void saveFile (String fileName, boolean compress, int level)
IOLogsHelper getIOHelper ()
void checkTimeFrame ()
void deleteLogs (Integer[] keys)

Private Attributes

LoggingClient loggingClient = null
boolean isSuspended = true
IOLogsHelper ioHelper = null
int maxLog = 0
long timeFrame = 0
LogDeleter logDeleter

Detailed Description

Extends the LogEntryTableModelBase adding I/O, deletion of logs and so on.

Author:
: Ales Pucelj (ales.pucelj@kgb.ijs.si)


Constructor & Destructor Documentation

alma::acs::logging::table::LogTableDataModel::LogTableDataModel LoggingClient  client  )  throws Exception [inline]
 

LCLogTableDataModel constructor comment. Gets updated logs.


Member Function Documentation

void alma::acs::logging::table::LogTableDataModel::checkTimeFrame  )  [inline, private]
 

Check if the time frame of the logs in cache exceeds the limit and if it is the case, deletes the oldest logs

void alma::acs::logging::table::LogTableDataModel::close boolean  sync  )  [inline]
 

Closes all the threads and frees the resources This is the last method to call before closing the application

Parameters:
sync If it is true wait the termination of the threads before returning

Reimplemented from alma::acs::logging::table::LogEntryTableModelBase.

void alma::acs::logging::table::LogTableDataModel::deleteLogs Integer[]  keys  )  [inline, private]
 

Delete the first logsToDelete logs from the data structures of the model.

Parameters:
The keys to remove from the cache

int alma::acs::logging::table::LogTableDataModel::getFieldSortNumber  )  [inline]
 

IOLogsHelper alma::acs::logging::table::LogTableDataModel::getIOHelper  )  [inline, private]
 

A getter method that created the helper only when needed

Returns:
The IOLogsHelper object

final boolean alma::acs::logging::table::LogTableDataModel::getSuspended  )  [inline]
 

Returns whether the saving/loading of the file has been cancelled or not that reflects on the status of the JToggleButton of the GUI. If canceled, then the button should be released.

boolean alma::acs::logging::table::LogTableDataModel::IOInProgress  )  [inline]
 

Return true if an async load/save is in progress

Returns:

void alma::acs::logging::table::LogTableDataModel::loadFromFile String  fileName  )  [inline]
 

Loads logs from a file. If the name of the file is null, a dialog to choose the file is shown.

Parameters:
filename The name of the file to load

void alma::acs::logging::table::LogTableDataModel::loadFromURL  )  [inline]
 

void alma::acs::logging::table::LogTableDataModel::saveFile String  fileName,
boolean  compress,
int  level
[inline, private]
 

Save the logs in a file

Parameters:
fileName The name of the file to save logs into
compress true if the file must be compressed (GZIP)
level The level of compression (ignored if compress is false)

void alma::acs::logging::table::LogTableDataModel::saveFile  )  [inline]
 

Saves input logs into a file.

void alma::acs::logging::table::LogTableDataModel::setMaxLog int  max  )  [inline]
 

Set the max number of logs to keep in cache This is the max number of logs stored in cache (the visible logs can be less)

Parameters:
max The max number of logs 0 means unlimited

void alma::acs::logging::table::LogTableDataModel::setSortComparator int  index,
boolean  ascending
[inline]
 

void alma::acs::logging::table::LogTableDataModel::setTimeFrame long  timeframe  )  [inline]
 

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)

Parameters:
timeframe The time frame in milliseconds 0 means unlimited

boolean alma::acs::logging::table::LogTableDataModel::sortedAscending  )  [inline]
 


Member Data Documentation

File alma::acs::logging::table::LogTableDataModel::currentDir = null
 

Contains references to the filters that are currently applied to logs. Actual filters are stored in filters. private final Vector appliedFilters = new Vector();

Stores the current directory which is being accessed.

IOLogsHelper alma::acs::logging::table::LogTableDataModel::ioHelper = null [private]
 

An object to load and save logs

boolean alma::acs::logging::table::LogTableDataModel::isSuspended = true [private]
 

LogDeleter alma::acs::logging::table::LogTableDataModel::logDeleter [private]
 

The thread to delete the logs asynchronously

LoggingClient alma::acs::logging::table::LogTableDataModel::loggingClient = null [private]
 

The LoggingClient that owns this table model

int alma::acs::logging::table::LogTableDataModel::maxLog = 0 [private]
 

The max number of logs in cache This limit is not for the buffer but for the size of the whole cache A value of 0 means unlimited

long alma::acs::logging::table::LogTableDataModel::timeFrame = 0 [private]
 

The time frame of the logs to keep in cache This limit is not for the buffer but for the timeframe of the whole cache A value of 0 means unlimited


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:59 2009 for ACS Java API by doxygen 1.3.8