DsLogAdmin::Log Interface Reference

The base log interface supported by all logs in the log service. More...

import "DsLogAdmin.idl";

Inherited by DsEventLogAdmin::EventLog, DsLogAdmin::BasicLog, and DsTypedEventLogAdmin::TypedEventLog.

List of all members.

Public Member Functions

LogMgr my_factory ()
 Return the factory that created this Log object.
LogId id ()
 Return the unique identifier of this Log object.
QoSList get_log_qos ()
 Return the current quality of service provided by this log.
void set_log_qos (in QoSList qos) raises (UnsupportedQoS)
 Set the quality of service provided by this log.
unsigned long get_max_record_life ()
 Return the maximum number of seconds that a record is stored in this log.
void set_max_record_life (in unsigned long life)
 Set the maximum number of seconds that a record is stored in the log.
unsigned long long get_max_size ()
 Return the maximum size of this log measured in bytes.
void set_max_size (in unsigned long long size) raises (InvalidParam)
 Set the maximum size of this log.
unsigned long long get_current_size ()
 Return the current size of this log measured in bytes.
unsigned long long get_n_records ()
 Return the current number of records contained in the log.
LogFullActionType get_log_full_action ()
 Get the action to be taken when a log is full.
void set_log_full_action (in LogFullActionType action) raises (InvalidLogFullAction)
 Set the action to be taken when a log is full.
AdministrativeState get_administrative_state ()
 Get the administrative state of the log.
void set_administrative_state (in AdministrativeState state)
 Set the administrative state of the log.
ForwardingState get_forwarding_state ()
 Get the forwarding state of the log.
void set_forwarding_state (in ForwardingState state)
 Set the forwarding state of the log.
OperationalState get_operational_state ()
 Get the operational state of the log.
TimeInterval get_interval ()
 Get the time interval in which this log is operational.
void set_interval (in TimeInterval interval) raises (InvalidTime, InvalidTimeInterval)
 Set the time interval in which this log is operational.
AvailabilityStatus get_availability_status ()
 Returns the availability status of this log.
CapacityAlarmThresholdList get_capacity_alarm_thresholds ()
 Get an array of percentage points where this log will generate a warning event.
void set_capacity_alarm_thresholds (in CapacityAlarmThresholdList threshs) raises (InvalidThreshold)
 Set an array of percentage points where this log will generate a warning event.
WeekMask get_week_mask ()
 Get the week masks in which this log is operational.
void set_week_mask (in WeekMask masks) raises (InvalidTime, InvalidTimeInterval, InvalidMask)
 Set the week masks in which this log is operational.
RecordList query (in string grammar, in Constraint c, out Iterator i) raises (InvalidGrammar, InvalidConstraint)
 Query the log for records.
RecordList retrieve (in TimeT from_time, in long how_many, out Iterator i)
 Retrieve a number of log records.
unsigned long match (in string grammar, in Constraint c) raises (InvalidGrammar, InvalidConstraint)
 Same as query except that only the number of records found is returned.
unsigned long delete_records (in string grammar, in Constraint c) raises (InvalidGrammar, InvalidConstraint)
 Delete records that match a constraint.
unsigned long delete_records_by_id (in RecordIdList ids)
 Delete records with given identification numbers.
void write_records (in Anys records) raises (LogFull, LogOffDuty, LogLocked, LogDisabled)
 Write an array of records into this log.
void write_recordlist (in RecordList list) raises (LogFull, LogOffDuty, LogLocked, LogDisabled)
 Write an array of records into this log.
void set_record_attribute (in RecordId id, in NVList attr_list) raises (InvalidRecordId, InvalidAttribute)
 Set a list of record attributes.
unsigned long set_records_attribute (in string grammar, in Constraint c, in NVList attr_list) raises (InvalidGrammar, InvalidConstraint, InvalidAttribute)
 Set the record attributes for all records that match some constraint.
NVList get_record_attribute (in RecordId id) raises (InvalidRecordId)
 Get the record attributes for a given log record.
Log copy (out LogId id)
 Create a new log that is a clone of this log.
Log copy_with_id (in LogId id) raises (LogIdAlreadyExists)
 Create a new log that is a clone of this log.
void flush () raises (UnsupportedQoS)
 Flush the records received by this log object.


Detailed Description

The base log interface supported by all logs in the log service.


Member Function Documentation

Log DsLogAdmin::Log::copy ( out LogId  id  ) 

Create a new log that is a clone of this log.

id - The unique identifier of the newly created log object.

Returns:
A new Log object.

Log DsLogAdmin::Log::copy_with_id ( in LogId  id  )  raises (LogIdAlreadyExists)

Create a new log that is a clone of this log.

id - The desired unique identifier of the newly created log object.

Returns:
A new Log object. LogIdAlreadyExists If a log object with that unique identifier already exists.

unsigned long DsLogAdmin::Log::delete_records ( in string  grammar,
in Constraint  c 
) raises (InvalidGrammar, InvalidConstraint)

Delete records that match a constraint.

grammar - The grammar to use for this query. c - The query constraint.

Returns:
Number of records that operation deleted. InvalidGrammar If the grammar is not supported by this implementation of the log service. InvalidConstraint If the constraint is not valid for the grammar.

unsigned long DsLogAdmin::Log::delete_records_by_id ( in RecordIdList  ids  ) 

Delete records with given identification numbers.

ids - A sequence of identification numbers.

Returns:
Number of records that operation deleted.

void DsLogAdmin::Log::flush (  )  raises (UnsupportedQoS)

Flush the records received by this log object.

This operation does nothing as all log records are flushed by default when received by the log. UnsupportedQoS Never raised.

AdministrativeState DsLogAdmin::Log::get_administrative_state (  ) 

Get the administrative state of the log.

If the state is unlocked, use of the log is permitted. If locked, the log will not create new records. Even if the log is locked, events will be forwarded and records may be deleted.

Returns:
The administrative state of this log.

AvailabilityStatus DsLogAdmin::Log::get_availability_status (  ) 

Returns the availability status of this log.

The log_full field indicates whether or not the log is full. The on_duty field is only set to true is the following conditions are satified:

Returns:
The availability status of this log.

CapacityAlarmThresholdList DsLogAdmin::Log::get_capacity_alarm_thresholds (  ) 

Get an array of percentage points where this log will generate a warning event.

Returns:
An array of alarm thresholds.

unsigned long long DsLogAdmin::Log::get_current_size (  ) 

Return the current size of this log measured in bytes.

Returns:
The size of this log.

ForwardingState DsLogAdmin::Log::get_forwarding_state (  ) 

Get the forwarding state of the log.

Returns:
The forwarding state of this log.

TimeInterval DsLogAdmin::Log::get_interval (  ) 

Get the time interval in which this log is operational.

Returns:
The operational time interval of this log.

LogFullActionType DsLogAdmin::Log::get_log_full_action (  ) 

Get the action to be taken when a log is full.

This implementation of the log service currently supports two different actions:

Returns:
The action to take when log is full.

QoSList DsLogAdmin::Log::get_log_qos (  ) 

Return the current quality of service provided by this log.

Returns:
An array with QoS settings.

unsigned long DsLogAdmin::Log::get_max_record_life (  ) 

Return the maximum number of seconds that a record is stored in this log.

A value of zero means that records are stored until the log is destroyed.

Returns:
The maximum record life time in seconds.

unsigned long long DsLogAdmin::Log::get_max_size (  ) 

Return the maximum size of this log measured in bytes.

If no maximum size has been set, the value zero is returned.

Returns:
The maximum size of this log.

unsigned long long DsLogAdmin::Log::get_n_records (  ) 

Return the current number of records contained in the log.

Returns:
The number of records stored in this log.

OperationalState DsLogAdmin::Log::get_operational_state (  ) 

Get the operational state of the log.

If enabled, the log is operational and ready to use. If disabled, a run-time problem has occurred and the log can not function.

Returns:
The operational state of this log.

NVList DsLogAdmin::Log::get_record_attribute ( in RecordId  id  )  raises (InvalidRecordId)

Get the record attributes for a given log record.

id - The log record identifier.

Returns:
The attributes for the log record with said identifier. InvalidRecordId If the log does not contain a record with the specified identifier.

WeekMask DsLogAdmin::Log::get_week_mask (  ) 

Get the week masks in which this log is operational.

Returns:
An array of week masks indicating when this log is active.

LogId DsLogAdmin::Log::id (  ) 

Return the unique identifier of this Log object.

Returns:
The identifier of this log.

unsigned long DsLogAdmin::Log::match ( in string  grammar,
in Constraint  c 
) raises (InvalidGrammar, InvalidConstraint)

Same as query except that only the number of records found is returned.

grammar - The grammar to use for this query. c - The query constraint.

Returns:
Number of records that match this constraint. InvalidGrammar If the grammar is not supported by this implementation of the log service. InvalidConstraint If the constraint is not valid for the grammar.

LogMgr DsLogAdmin::Log::my_factory (  ) 

Return the factory that created this Log object.

Returns:
A LogMgr object. This object can be narrowed to a specific log factory.

RecordList DsLogAdmin::Log::query ( in string  grammar,
in Constraint  c,
out Iterator  i 
) raises (InvalidGrammar, InvalidConstraint)

Query the log for records.

grammar - The grammar to use for this query. c - The query constraint. i - An iterator if a large number of records are returned.

Returns:
An array of log records. InvalidGrammar If the grammar is not supported by this implementation of the log service. InvalidConstraint If the constraint is not valid for the grammar.

RecordList DsLogAdmin::Log::retrieve ( in TimeT  from_time,
in long  how_many,
out Iterator  i 
)

Retrieve a number of log records.

from_time - The time to start from. Only log records written after this time are returned. how_many - The maximum number of records to return from this operation. The remaining records are returned by means of the iterator. i - An iterator with remaining records if the operation would have returned more than how_many records.

Returns:
An array of log records.

void DsLogAdmin::Log::set_administrative_state ( in AdministrativeState  state  ) 

Set the administrative state of the log.

state - The new administrative state of this log.

void DsLogAdmin::Log::set_capacity_alarm_thresholds ( in CapacityAlarmThresholdList  threshs  )  raises (InvalidThreshold)

Set an array of percentage points where this log will generate a warning event.

Each elements in the array must have a value between 0 and 100 percent. This log will generate an capacity threshold alarm event when the log size exceeds each of the values in threshs. threshs - An array with new alarm thresholds. InvalidThreshold If any of the elements in threshs are not in the range 0-100.

void DsLogAdmin::Log::set_forwarding_state ( in ForwardingState  state  ) 

Set the forwarding state of the log.

When the state is set to off this log will not forward events from its suppliers to its consumers. state - The new forwarding state of this log.

void DsLogAdmin::Log::set_interval ( in TimeInterval  interval  )  raises (InvalidTime, InvalidTimeInterval)

Set the time interval in which this log is operational.

Setting the start time to zero means that the log should start logging immediately. If the start time is before the time at which this operation is invoked, the log will start logging immediately. If the stop time is set to zero, the log will continue to log until it is destroyed. Note that the log interval only affects the writing of records. The log will forward events regardless of this setting until the log is destroyed. interval - The operational time interval of this log. InvalidTime If the stop time is before the time at which this operation is invoked. InvalidTimeInterval If the stop time is before the start time.

void DsLogAdmin::Log::set_log_full_action ( in LogFullActionType  action  )  raises (InvalidLogFullAction)

Set the action to be taken when a log is full.

This operation is delegated to the associated LogStore plug-in object. action - The new action to take when log is full. InvalidLogFullAction If the LogStore plug-in object did not supported the supplied setting.

void DsLogAdmin::Log::set_log_qos ( in QoSList  qos  )  raises (UnsupportedQoS)

Set the quality of service provided by this log.

This is delegated to the LogStore plug-in object used for persistence. qos - An array with new QoS settings. UnsupportedQoS If any of the elements in qos do not have the value of QoSReliability.

void DsLogAdmin::Log::set_max_record_life ( in unsigned long  life  ) 

Set the maximum number of seconds that a record is stored in the log.

A value of zero means that records are stored until the log is destroyed. life - The new maximum record life time in seconds.

void DsLogAdmin::Log::set_max_size ( in unsigned long long  size  )  raises (InvalidParam)

Set the maximum size of this log.

The unit of this parameter is bytes. A value of zero means that the maximum size of the log is unlimited. size - The new maximum size of this log. InvalidParam If size is less than the current size of the log.

void DsLogAdmin::Log::set_record_attribute ( in RecordId  id,
in NVList  attr_list 
) raises (InvalidRecordId, InvalidAttribute)

Set a list of record attributes.

A log record supports any number of records attributes. Since an attribute is merely a name-value pair, it is up to client applications to define meaningful record attributes. id - The log record identifier. attr_list - A sequence of attributes. InvalidRecordId If the log does not contain a record with the specified identifier. InvalidAttribute Not raised by this implementation of the log service.

unsigned long DsLogAdmin::Log::set_records_attribute ( in string  grammar,
in Constraint  c,
in NVList  attr_list 
) raises (InvalidGrammar, InvalidConstraint, InvalidAttribute)

Set the record attributes for all records that match some constraint.

A log record supports any number of records attributes. Since an attribute is merely a name-value pair, it is up to client applications to define meaningful record attributes. grammar - The grammar to use for this query. c - The constraint that records must match. attr_list - A sequence of attributes.

Returns:
Number of records that operation affected. InvalidGrammar If the grammar is not supported by this implementation of the log service. InvalidRecordId If the log does not contain a record with the specified identifier. InvalidAttribute Not raised by this implementation of the log service.

void DsLogAdmin::Log::set_week_mask ( in WeekMask  masks  )  raises (InvalidTime, InvalidTimeInterval, InvalidMask)

Set the week masks in which this log is operational.

When no week masks are specified, the log will be operational during the entire week. Each element in the masks sequence indicates a start time and a stop time and a bit mask of days where this time interval should be applied. Note that the week masks only affects the writing of records.The log will forward events regardless of this setting until the log is destroyed. masks - An array of week masks indicating when this log is active. InvalidTime If the value of the hour field is not within the interval 0-23 or if the value of the minute field is not within the interval 0-59. InvalidTimeInterval If the start time of day is after the stop time of day. InvalidMask If the days field of a week mask is not a valid bit field.

void DsLogAdmin::Log::write_recordlist ( in RecordList  list  )  raises (LogFull, LogOffDuty, LogLocked, LogDisabled)

Write an array of records into this log.

The log records are logged but not forwarded. records - A sequence of log records. LogFull If the log is full and the LogFullAction property is set to halt. LogOffDuty If the log's availability status is "off_duty". LogLocked If the log's administrative state is locked. LogDisabled If the log's operational state is "disabled".

void DsLogAdmin::Log::write_records ( in Anys  records  )  raises (LogFull, LogOffDuty, LogLocked, LogDisabled)

Write an array of records into this log.

The log records are logged but not forwarded. records - A sequence of records. LogFull If the log is full and the LogFullAction property is set to halt. LogOffDuty If the log's availability status is "off_duty". LogLocked If the log's administrative state is locked. LogDisabled If the log's operational state is "disabled".