101#ifndef _OMNIEVENTSLOG_H_
102#define _OMNIEVENTSLOG_H_
112# include <iostream.h>
116#ifdef HAVE_STD_IOSTREAM
121# include <omniORB3/CORBA.h>
125# include <omniORB4/CORBA.h>
130class EventChannelFactory_i;
133#ifndef OMNIEVENTS_LOGDIR_ENV_VAR
134# define OMNIEVENTS_LOGDIR_ENV_VAR "OMNIEVENTS_LOGDIR"
184 virtual void output(ostream& os);
196 const char* hostname,
201 const char* filename,
227 priority_t priority=PRIORITY_NORMAL
static omniEventsLog * theLog
const char * backupFilename() const
void setFilename(char *&filename, const char *logdir, const char *sep, const char *logname, const char *hostname, const char *ext)
Helper function that sets the value of the first parameter to the concatenation of all the subsequent...
PersistNode * bootstrap(int port, const char *endPointNoListen)
Creates an initialState from its arguments.
void incarnateFactory(PersistNode *initialState)
Constructs the EventChannelFactory from the information in the initialState parameter.
EventChannelFactory_i * _factory
virtual void openOfstream(ofstream &s, const char *filename, int flags=0, int *fd=NULL)
Helper method that opens an output file stream using whatever method is available.
char * _checkpointFilename
EventChannelFactory_i * factory()
accessor method
virtual PersistNode * parse()
Creates an initialState from the logfile.
bool fileExists(const char *filename) const
virtual void initializeFileNames(const char *logdir)
Sets the values of 'active', 'backup' and 'checkpoint' file names.
virtual void runWorker()
Kicks off the worker thread that periodically checkpoints the persistency logfile.
const char * activeFilename() const
omni_thread * _workerThread
In charge of checkpoints.
virtual void output(ostream &os)
void checkpoint(void)
Entry point used by the omniEventsLogWorker to perform checkpointing.
static bool exists()
Library code may create Event Service objects without the need for persistency.
omniEventsLogWorker()
No default construction allowed.
void * run_undetached(void *)
void(omniEventsLog::* Method)(void)
Obtains an output stream to the active persistancy logfile, and locks it for exclusive access.
WriteLock(const WriteLock &)
No implementation.