|
VisiBroker for Java |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogOperations
The Log interface allows log clients to manipulate log records in the following manner:
Method Summary | |
---|---|
Log |
copy_with_id(int id)
creates an empty log with its attributes initialized to the same values as the log on which the operation was invoked. |
Log |
copy(IntHolder id)
creates an empty log with its attributes initialized to the same values as the log on which the operation was invoked. |
int |
delete_records_by_id(long[] ids)
Deletes specific log records from the log. |
int |
delete_records(java.lang.String grammar,
java.lang.String c)
Deletes log records that match the given constraint from the log. |
void |
flush()
The flush() operation guarantees that all events sent to the log prior to the invocation of the flush() operation will be written to final storage medium before the flush() operation completes. |
AdministrativeState |
get_administrative_state()
Returns the administrative state of the log. |
AvailabilityStatus |
get_availability_status()
Returns a struct that reflects the availability status of the Log. |
short[] |
get_capacity_alarm_thresholds()
Returns a sequence of value that specifies, as a percentage of max log size, the points at which a ThresholdAlarm event will be generated. |
long |
get_current_size()
Returns the current size of the log measured in bytes. |
ForwardingState |
get_forwarding_state()
Returns the forwarding state of a log. |
TimeInterval |
get_interval()
Returns the coarse grained time interval during which an unlocked and enabled Log is functional. |
short |
get_log_full_action()
Returns the action that will be taken when the maximum size of the log has been reached. |
short[] |
get_log_qos()
Returns a list of the quality of service properties supported by the log. |
int |
get_max_record_life()
Returns the maximum number of seconds a record is stored in a log. |
long |
get_max_size()
Returns the size of the log measured in number of bytes. |
long |
get_n_records()
Returns the current number of records contained in the log. |
OperationalState |
get_operational_state()
Returns the operational capability of the log to perform its function. |
NVPair[] |
get_record_attribute(long id)
Returns the attributes of a given log record indicated by the id parameter. |
WeekMaskItem[] |
get_week_mask()
Returns the fine grained time intervals during which an unlocked and enabled Log is functional. |
int |
id()
The id() operation returns the id of a log. |
int |
match(java.lang.String grammar,
java.lang.String c)
Searches the log for all log records that match the given constraint and returns number of records matching constraint. |
LogMgr |
my_factory()
The my_factory() operation returns the log factory object that created the log. |
LogRecord[] |
query(java.lang.String grammar,
java.lang.String c,
org.omg.DsLogAdmin.IteratorHolder i)
Searches the log for all log records that match the given constraint. |
LogRecord[] |
retrieve(long from_time,
int how_many,
org.omg.DsLogAdmin.IteratorHolder i)
Reads the log records in the log sequentially starting from any given time. |
void |
set_administrative_state(AdministrativeState state)
Sets the administrative state of the log. |
void |
set_capacity_alarm_thresholds(short[] threshs)
Sets the points at which a ThresholdAlarm event will be generated. |
void |
set_forwarding_state(ForwardingState state)
Sets the forwarding state of a log. |
void |
set_interval(TimeInterval interval)
Sets the start and stop time during which an unlocked and enabled log is functional. |
void |
set_log_full_action(short action)
Sets which action should be taken when the maximum size of the log has been reached. |
void |
set_log_qos(short[] qos)
Sets the quality of service properties of the log. |
void |
set_max_record_life(int life)
Sets the maximum number of seconds a record is stored in a log. |
void |
set_max_size(long size)
Sets the maximum log size. |
void |
set_record_attribute(long id,
NVPair[] attr_list)
sets the log record indicated by the id parameter to the attributes specified by the attr_list parameter. |
int |
set_records_attribute(java.lang.String grammar,
java.lang.String c,
NVPair[] attr_list)
Set all records that matches the constraints with same attr_list |
void |
set_week_mask(WeekMaskItem[] masks)
Sets the fine grained time intervals during which an unlocked and enabled log is functional. |
void |
write_recordlist(LogRecord[] list)
Write to the log. |
void |
write_records(Any[] records)
Write to the log. |
Method Detail |
---|
void flush() throws UnsupportedQoS
UnsupportedQoS
- if a log implementation does not support QoSFlush property.Log copy_with_id(int id) throws LogIdAlreadyExists
id
- The log id of the created log is specified as an in parameter.
LogIdAlreadyExists
- if the log id already exists within the scope of the log factory.Log copy(IntHolder id)
id
- The log id of the created log is generated and returned as an out parameter.
NVPair[] get_record_attribute(long id) throws InvalidRecordId
id
- The ID of the log record want to retrieve.
InvalidRecordId
- If the log record does not exist.int set_records_attribute(java.lang.String grammar, java.lang.String c, NVPair[] attr_list) throws InvalidGrammar, InvalidConstraint, InvalidAttribute
grammar
- indicates how to interpret the constraint string.
The default grammar is "EXTENDED_TCL" specified in the Notification Service.constraint
- Specify which log records the client wishes to set attributes.attr_list
- The attributes.
InvalidGrammar
- if the implementation does not support the grammar specified.
InvalidConstraint
- if the constraint string is invalid.
InvalidAttribute
- if one of the attributes is invalid.void set_record_attribute(long id, NVPair[] attr_list) throws InvalidRecordId, InvalidAttribute
id
- The ID of the log record want to set attribute.attr_list
- The attributes.
InvalidRecordId
- If the log record does not exist.
InvalidAttribute
- if one of the attributes is not valid.void write_recordlist(LogRecord[] list) throws LogFull, LogOffDuty, LogLocked, LogDisabled
list
- The record list returned by a query.
LogFull
- If the log?s availability status is "log_full" and its
LogFullAction is "halt," then a LogFull exception is raised and
the number of log records written will be returned in the exception.
LogOffDuty
- If the log?s availability status is "off_duty",
then a LogOffDuty exception is raised and no log records are written.
LogLocked
- If the log?s administrative state is "locked",
then a LogLocked exception is raised and no log records are written.
LogDisabled
- If the log?s operational state is "disabled",
then a LogDisabled exception is raised and no log records are written.void write_records(Any[] records) throws LogFull, LogOffDuty, LogLocked, LogDisabled
records
- A sequence of Anys as a parameter, each Any
contains the event to be logged.
LogFull
- If the log?s availability status is "log_full" and its
LogFullAction is "halt," then a LogFull exception is raised and
the number of log records written will be returned in the exception.
LogOffDuty
- If the log?s availability status is "off_duty",
then a LogOffDuty exception is raised and no log records are written.
LogLocked
- If the log?s administrative state is "locked",
then a LogLocked exception is raised and no log records are written.
LogDisabled
- If the log?s operational state is "disabled",
then a LogDisabled exception is raised and no log records are written.int delete_records_by_id(long[] ids)
ids
- A sequence of log record ids as a parameter.
int delete_records(java.lang.String grammar, java.lang.String c) throws InvalidGrammar, InvalidConstraint
grammar
- The grammar parameter indicates how to interpret the constraint string.
The default grammar is "EXTENDED_TCL" specified in the Notification Service.c
- The constraint parameter specifies which log records the client wishes to
receive.
InvalidGrammar
- if the implementation does not support the grammar specified.
InvalidConstraint
- if the constraint string is invalid.int match(java.lang.String grammar, java.lang.String c) throws InvalidGrammar, InvalidConstraint
grammar
- The grammar parameter indicates how to interpret the constraint string.
The default grammar is "EXTENDED_TCL" specified in the Notification Service.c
- The constraint parameter specifies which log records the client wishes to
receive.
InvalidGrammar
- if the implementation does not support the grammar specified.
InvalidConstraint
- if the constraint string is invalid.LogRecord[] retrieve(long from_time, int how_many, org.omg.DsLogAdmin.IteratorHolder i)
from_time
- Indicates which time to start from.how_many
- Indicates how many log records to retrieve, and the sign of the
how_many parameter indicates the direction (positive for forward retrieval or
negative for backward retrieval).i
- The log records are returned as a sequence and an iterator may be provided
as an out parameter to deal with large retrievals. If the iterator is not needed,
then the iterator will hold a nil object referenceLogRecord[] query(java.lang.String grammar, java.lang.String c, org.omg.DsLogAdmin.IteratorHolder i) throws InvalidGrammar, InvalidConstraint
grammar
- The grammar parameter indicates how to interpret the constraint string.
The default grammar is "EXTENDED_TCL" specified in the Notification Service.c
- The constraint parameter specifies which log records the client wishes to
receive.i
- The log records are returned as a sequence and an iterator may be provided as
an out parameter to deal with large query results. If the iterator is not needed,
then the iterator will hold a nil object reference.
InvalidGrammar
- if the implementation does not support the grammar specified.
InvalidConstraint
- if the constraint string is invalid.void set_week_mask(WeekMaskItem[] masks) throws InvalidTime, InvalidTimeInterval, InvalidMask
masks
- The fine grained time intervals during which an unlocked and enabled log is functional.
InvalidTime
- if the time specified in the time interval is invalid.
InvalidTimeInterval
- if the time interval specified is invalid.
InvalidMask
WeekMaskItem[] get_week_mask()
void set_capacity_alarm_thresholds(short[] threshs) throws InvalidThreshold
threshs
- The threshold list.
InvalidThreshold
- if the threshold list contains invalid values.short[] get_capacity_alarm_thresholds()
AvailabilityStatus get_availability_status()
void set_interval(TimeInterval interval) throws InvalidTime, InvalidTimeInterval
interval
- The time interval.
InvalidTime
- if the time specified in the time interval is invalid.
InvalidTimeInterval
- if the time interval specified is invalid.TimeInterval get_interval()
OperationalState get_operational_state()
void set_forwarding_state(ForwardingState state)
state
- The forwarding state.ForwardingState get_forwarding_state()
void set_administrative_state(AdministrativeState state)
state
- The administrative state.AdministrativeState get_administrative_state()
void set_log_full_action(short action) throws InvalidLogFullAction
action
- The action to be taken.
InvalidLogFullAction
- if the input action is neither wrap nor halt.short get_log_full_action()
long get_n_records()
long get_current_size()
void set_max_size(long size) throws InvalidParam
size
- The log size
InvalidParam
- if the maximum log size specified is less than the current log size.long get_max_size()
void set_max_record_life(int life)
life
- the maximum number of seconds a record is stored in a logint get_max_record_life()
void set_log_qos(short[] qos) throws UnsupportedQoS
qos
- The list of the quality of service properties to set to the log
UnsupportedQoS
- if an implementation does not support the specified
quality of service property.short[] get_log_qos()
int id()
LogMgr my_factory()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |