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

com::cosylab::logging::engine::cache::CacheEntry Class Reference

List of all members.

Public Member Functions

 CacheEntry (Integer key, long startPos, long endPos)
 CacheEntry (String hexadecimal)
String toHexadecimal ()

Public Attributes

final int key
final long start
final long end

Static Public Attributes

final int ENTRY_LENGTH = 40

Detailed Description

An entry of the cache. It contains the name of the file where the entry is stored together with the position of the entry.

Having the name of the file allows to open and close the file when needed. In a previous version there was a RandomAccessFile instead of the name but it ended up with an error because the number of open file was exceeding the maximum allowed.

Author:
acaproni


Constructor & Destructor Documentation

com::cosylab::logging::engine::cache::CacheEntry::CacheEntry Integer  key,
long  startPos,
long  endPos
[inline]
 

Constructor

Parameters:
key The key of the file where the entry is stored
startPos The starting position of the entry in the file
endPos The ending position of the entry in the file

com::cosylab::logging::engine::cache::CacheEntry::CacheEntry String  hexadecimal  )  [inline]
 

Constructor.

Build the entry by its hexadecimal representation

Parameters:
hexadecimal 
See also:
toHexadecimal()


Member Function Documentation

String com::cosylab::logging::engine::cache::CacheEntry::toHexadecimal  )  [inline]
 

Translate the content of the entry in an hexadecimal string composed of the key, the start and end.

The array returned by this method can be written on a file. Its length is constant for each possible entry so the fields are not separated.

Returns:
An hexadecimal string representing the content of this entry


Member Data Documentation

final long com::cosylab::logging::engine::cache::CacheEntry::end
 

The ending position of the entry in the file

final int com::cosylab::logging::engine::cache::CacheEntry::ENTRY_LENGTH = 40 [static]
 

The length of the bytes representing each entry.

This number is useful while caching the entries on a file.

40 is 8 for the integer and 2 time 16 for the longs.

See also:
toBytes()

final int com::cosylab::logging::engine::cache::CacheEntry::key
 

The key of the file where the entry is stored

final long com::cosylab::logging::engine::cache::CacheEntry::start
 

The starting position of the entry in the file


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