public class EventsArchiver extends Object
The EventsArchiver is responsible for archiving and removing events
from the 'events' table.
The archival/deletion depends on the 'eventLog' and the 'eventDisplay'
values for the event -
If the 'eventLog == N and the eventDisplay == N',
the event is simply deleted from the events table
If the 'eventLog == N and the eventDisplay == Y',
the event is deleted ONLY if the event has been acknowledged
If the 'eventLog == Y and the eventDisplay == N',
the event is sent to the archive file and deleted from the table
If the 'eventLog == Y and the eventDisplay == Y',
the event is sent to the archive file and deleted from the table
ONLY if the event has been acknowledged
An event is considered acknowledged if the 'eventAckUser' column has
a non-null value
An EventsArchiver run depends on attributes in the events archiver
configuration file. The following are the properties that govern a run -
- archiveAge
This determines which events are to be removed - i.e events older
than current time minus this time are removed
- separator
This is the separator used in between event table column values when an
event is written to the archive file
The EventsArchiver uses Apache's log4j both for its output logs and for
the actual archiving itself - the set up for the log4j appenders for
this archiver are all doneexclusively in the 'events.archiver.properties'
property file
A RollingFileAppender
is used
for the archive file with the defaults for this being to roll when the
size is 100KB with the number of backups set to 4.
Constructor and Description |
---|
EventsArchiver()
The events archiver constructor - reads required properties, initializes
the database connection and the prepared statements to select and delete
events
|
public EventsArchiver() throws ArchiverException
ArchiverException
- if any.Copyright © 2015. All Rights Reserved.