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

Inheritance diagram for alma::acs::logging::engine::LogReceiver::DelayedLogEntry:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::engine::LogReceiver::DelayedLogEntry:
Collaboration graph
[legend]

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

static 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

static 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 

References logRecordCounter, logRecordIndex, and triggerTimeMillis.


Member Function Documentation

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

This method is used by the queue for sorting.

References logRecordIndex, and triggerTimeMillis.

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

References DelayedLogEntry(), and isQueuePoison.

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

Equals method, just to be consistent with compareTo.

References logRecordIndex, and triggerTimeMillis.

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.

References triggerTimeMillis.

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

References delayTimeMillis.

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.

References logEntry.

Referenced by alma::acs::logging::engine::LogReceiver::startCaptureLogs().

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.

References logEntry.

Referenced by alma::contLogTest::TestLogLevelsCompImpl::LogSeriesExpectant::awaitLogRecords(), and alma::acs::component::client::ClientWithLogReceiverTest::testLogQueueNoDelay().

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

delay for sorting by timestamp

Referenced by getDelayTimeMillis().

Referenced by getLogEntry(), and getLogRecord().

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

Referenced by DelayedLogEntry().

Referenced by compareTo(), DelayedLogEntry(), and equals().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2