

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() |
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.
| alma::acs::logging::engine::LogReceiver::DelayedLogEntry::DelayedLogEntry | ( | ILogEntry | logEntry, | |
| long | delayTimeMillis | |||
| ) | [inline, package] |
References com::cosylab::logging::engine::log::ILogEntry::getField(), logRecordCounter, logRecordIndex, and triggerTimeMillis.
Referenced by createQueuePoison().
| alma::acs::logging::engine::LogReceiver::DelayedLogEntry::DelayedLogEntry | ( | long | delayTimeMillis | ) | [inline, private] |
Ctor used for special queue poison instance
| delayTimeMillis |
References logRecordCounter, logRecordIndex, and triggerTimeMillis.
| 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)
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().
| 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".
delay for sorting by timestamp
Referenced by getDelayTimeMillis().
boolean alma::acs::logging::engine::LogReceiver::DelayedLogEntry::isQueuePoison = false [private] |
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().
Referenced by compareTo(), DelayedLogEntry(), equals(), and getDelay().
1.6.2