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

alma::acs::logging::engine::LogReceiver::DelayedLogEntry Class Reference

List of all members.

Public Member Functions

boolean isQueuePoison ()
ILogEntry getLogEntry ()
ReceivedLogRecord getLogRecord ()
long getDelay (TimeUnit unit)
int compareTo (Delayed other)
boolean equals (Object other)

Static Public Member Functions

DelayedLogEntry createQueuePoison (long delayTimeMillis)

Package Functions

 DelayedLogEntry (ILogEntry logEntry, long delayTimeMillis)
long getDelayTimeMillis ()

Private Member Functions

 DelayedLogEntry (long delayTimeMillis)

Private Attributes

long delayTimeMillis
boolean isQueuePoison = false
int logRecordIndex
ILogEntry logEntry
long triggerTimeMillis

Static Private Attributes

final AtomicInteger logRecordCounter = new AtomicInteger()

Detailed Description

Wraps an ILogEntry for storage in a java.util.concurrent.DelayQueue.

The delayTimeMillis parameter in the constructor sets the buffer time during which log entries are not yet available for the consumer, so that late arriving records get a chance to be sorted in according to timestamp.
As of ACS 7.0.1 the issue of timestamps that lie in the future (e.g. logs from a different machine with unsync'd time) is addressed in the way that "future" log records will become available to the consumer before the local system time has reached the timestamp.

Author:
hsommer


Constructor & Destructor Documentation

alma::acs::logging::engine::LogReceiver::DelayedLogEntry::DelayedLogEntry ILogEntry  logEntry,
long  delayTimeMillis
[inline, package]
 

alma::acs::logging::engine::LogReceiver::DelayedLogEntry::DelayedLogEntry long  delayTimeMillis  )  [inline, private]
 

Ctor used for special queue poison instance

Parameters:
delayTimeMillis 


Member Function Documentation

int alma::acs::logging::engine::LogReceiver::DelayedLogEntry::compareTo Delayed  other  )  [inline]
 

This method is used by the queue for sorting.

DelayedLogEntry alma::acs::logging::engine::LogReceiver::DelayedLogEntry::createQueuePoison long  delayTimeMillis  )  [inline, static]
 

boolean alma::acs::logging::engine::LogReceiver::DelayedLogEntry::equals Object  other  )  [inline]
 

Equals method, just to be consistent with compareTo.

long alma::acs::logging::engine::LogReceiver::DelayedLogEntry::getDelay TimeUnit  unit  )  [inline]
 

This method is used by the queue to determine whether the log record may leave the queue already.

long alma::acs::logging::engine::LogReceiver::DelayedLogEntry::getDelayTimeMillis  )  [inline, package]
 

ILogEntry alma::acs::logging::engine::LogReceiver::DelayedLogEntry::getLogEntry  )  [inline]
 

Returns the ILogEntry class that was wrapped for sorting inside the queue. That class represents the log record as it was received from the logging service. Beware that the log level you get from this ILogEntry is not an ACS log level, but comes from some level representation internally used by the jlog application whose code got reused here! To get an ACS level, you must convert it using LogTypeHelper#getAcsCoreLevel(Integer)

Deprecated:
use getLogRecord() to avoid dealing with jlog-internal log level (=severity) number ranges.

ReceivedLogRecord alma::acs::logging::engine::LogReceiver::DelayedLogEntry::getLogRecord  )  [inline]
 

Returns the log record that was wrapped for sorting inside the queue. The returned object represents the log record as it was received from the logging service.

boolean alma::acs::logging::engine::LogReceiver::DelayedLogEntry::isQueuePoison  )  [inline]
 

True if this entry designates the end of the queue. According to BlockingQueue, this element is called the "poison".

Returns:
true if this is the end-of-queue marker.
See also:
createQueuePoison(long)


Member Data Documentation

long alma::acs::logging::engine::LogReceiver::DelayedLogEntry::delayTimeMillis [private]
 

delay for sorting by timestamp

boolean alma::acs::logging::engine::LogReceiver::DelayedLogEntry::isQueuePoison = false [private]
 

ILogEntry alma::acs::logging::engine::LogReceiver::DelayedLogEntry::logEntry [private]
 

final AtomicInteger alma::acs::logging::engine::LogReceiver::DelayedLogEntry::logRecordCounter = new AtomicInteger() [static, private]
 

int alma::acs::logging::engine::LogReceiver::DelayedLogEntry::logRecordIndex [private]
 

long alma::acs::logging::engine::LogReceiver::DelayedLogEntry::triggerTimeMillis [private]
 


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