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< ILogEntry > | iterator () |
Integer | getLastLog () |
Integer | getFirstLog () |
int | getFirstLogs (int n, Collection< Integer > keys) |
The interface with the methods for the map of logs. The cache is implementing this interface.
int com.cosylab.logging.client.cache.ILogMap.add | ( | ILogEntry | log | ) | throws LogCacheException |
Add a log in the map
log | The log to add in the map |
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
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
key |
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.
Referenced by com.cosylab.logging.client.cache.LogIterator.remove().
void com.cosylab.logging.client.cache.ILogMap.deleteLogs | ( | Collection< Integer > | keys | ) | throws LogCacheException |
Delete a set of logs
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.
Implemented in com.cosylab.logging.client.cache.LogBufferedFileCache, com.cosylab.logging.client.cache.LogFileCache, and com.cosylab.logging.client.cache.LogMultiFileCache.
Referenced by com.cosylab.logging.client.cache.LogIterator.next().
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.
n | The desired number of keys of first logs | |
keys | The collection to add they keys to |
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
Implemented in com.cosylab.logging.client.cache.LogBufferedFileCache, com.cosylab.logging.client.cache.LogFileCache, and com.cosylab.logging.client.cache.LogMultiFileCache.
Referenced by com.cosylab.logging.client.cache.LogIterator.hasNext(), and com.cosylab.logging.client.cache.LogIterator.next().
ILogEntry com.cosylab.logging.client.cache.ILogMap.getLog | ( | Integer | key | ) | throws LogCacheException |
Return a log eith the given key
key | The key of the logs |
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.
Referenced by com.cosylab.logging.client.cache.LogIterator.next().
int com.cosylab.logging.client.cache.ILogMap.getSize | ( | ) |
Implemented in com.cosylab.logging.client.cache.LogBufferedFileCache, com.cosylab.logging.client.cache.LogFileCache, and com.cosylab.logging.client.cache.LogMultiFileCache.
Referenced by com.cosylab.logging.client.cache.LogIterator.hasNext().
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.
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
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.
Referenced by com.cosylab.logging.client.cache.LogIterator.next().
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
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.