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

com::cosylab::logging::client::cache::ILogMap Interface Reference

Inheritance diagram for com::cosylab::logging::client::cache::ILogMap:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void clear () throws LogCacheException
void deleteLog (Integer key) throws LogCacheException
void deleteLogs (Collection< Integer > keys) throws LogCacheException
int getSize ()
Set< Integer > keySet ()
ILogEntry getLog (Integer key) throws LogCacheException
int add (ILogEntry log) throws LogCacheException
void replaceLog (Integer key, ILogEntry log) throws LogCacheException
Iterator< ILogEntryiterator ()
Integer getLastLog ()
Integer getFirstLog ()
int getFirstLogs (int n, Collection< Integer > keys)

Detailed Description

The interface with the methods for the map of logs. The cache is implementing this interface.

Author:
acaproni


Member Function Documentation

int com::cosylab::logging::client::cache::ILogMap::add ILogEntry  log  )  throws LogCacheException
 

Add a log in the map

Parameters:
log The log to add in the map
Returns:
The key of the added log
Exceptions:
LogCacheException 

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

void com::cosylab::logging::client::cache::ILogMap::clear  )  throws LogCacheException
 

Clear the Map i.e. remove all the logs and keys from the map

Exceptions:
LogCacheException 

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

void com::cosylab::logging::client::cache::ILogMap::deleteLog Integer  key  )  throws LogCacheException
 

Remove a log from the Map

Parameters:
key 
Exceptions:
LogCacheException 

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

void com::cosylab::logging::client::cache::ILogMap::deleteLogs Collection< Integer >  keys  )  throws LogCacheException
 

Delete a set of logs

Parameters:
keys The keys of logs to delete

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

Integer com::cosylab::logging::client::cache::ILogMap::getFirstLog  ) 
 

Return the key of the first valid log (FIFO). The key of the first log is 0 but it can change if the log 0 has been deleted.

Returns:
The key of the first log null if the cache is empty

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

int com::cosylab::logging::client::cache::ILogMap::getFirstLogs int  n,
Collection< Integer >  keys
 

Append at most n keys from the first valid logs to the collection. First here means first in the FIFO policy.

The number of added keys can be less then n if the cache doesn't contain enough logs.

Parameters:
n The desired number of keys of first logs
keys The collection to add they keys to
Returns:
The number of keys effectively added

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

Integer com::cosylab::logging::client::cache::ILogMap::getLastLog  ) 
 

Return the key of the last valid log (FIFO) The key of the last log is the key of the last inserted log but it can cheang if such log has been deleted

Returns:
The key of the last inserted log null if th cache is empty

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

ILogEntry com::cosylab::logging::client::cache::ILogMap::getLog Integer  key  )  throws LogCacheException
 

Return a log eith the given key

Parameters:
key The key of the logs
Returns:
The log with the given key
Exceptions:
LogCacheException 

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

int com::cosylab::logging::client::cache::ILogMap::getSize  ) 
 

Returns:
The number of logs in the map

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

Iterator<ILogEntry> com::cosylab::logging::client::cache::ILogMap::iterator  ) 
 

Return an Iterator to browse the logs in the map. The order the iterator returns the logs is that of the keys.

Returns:
an Iterator over the elements in this map

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

Set<Integer> com::cosylab::logging::client::cache::ILogMap::keySet  ) 
 

The keys in the map

Returns:
The key in the map

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.

void com::cosylab::logging::client::cache::ILogMap::replaceLog Integer  key,
ILogEntry  log
throws LogCacheException
 

Replace the log in the given position with the new one

Parameters:
position The position of the log to replace
log The key (identifier) ot the log

Implemented in com::cosylab::logging::client::cache::LogBufferedFileCache, com::cosylab::logging::client::cache::LogFileCache, and com::cosylab::logging::client::cache::LogMultiFileCache.


The documentation for this interface was generated from the following file:
Generated on Thu Apr 30 03:13:03 2009 for ACS Java API by doxygen 1.3.8