Show TOC

Classes in the LDQ API - "Read"Locate this document in the navigation structure

Use

Reader Class CL_LDQ_READER

The class CL_LDQ_READER serves to initialize the table of queues for the LDQ reading use case. The class implements the interface IF_LDQ_READER.

The CONFIRM_QUEUE_UNITS method in this class is the only LDQ method that executes an implicit commit. All other methods of this class and the other LDQ classes require an Explicit Commit to persist their work in the database.

UML Representation:

Attribute Overview:

Attribute

Visibility/Level

Description

M_APPLICATION_NAME

Protected Instance

LDQ application name

Method overview:

Method

Visibility/Level

Description

SET_QUEUE_NAME

Public Instance

The method creates an LDQ unit reader object. The method requires an LDQ queue name and returns an interface reference. The method throws an exception when the queue is in use by another reader.

SET_QUEUE_NAME_BY_OFFSET

Public Instance

Creates an LDQ unit reader object for a given queue with a given offset for the queue's Read Counter. If the offset is greater than the current Read Counter (= attempt to skip reading some units), an exception is thrown. If the offset is smaller than the current Top Counter (= attempt to read units already confirmed), an exception is thrown.

CONFIRM_QUEUE_UNITS

Public Instance

Marks for deletion the units already read up to a given sequence number. If the offset counter is greater than the current Read Counter (= attempt to confirm a unit that was never read), an exception is thrown. If the offset counter is smaller than the current Top Counter (= attempt to confirm units already confirmed), an exception is thrown.

Note: This method executes an Implicit Commit.

Unit Reader Class CL_LDQ_UNIT_READER

The class CL_LDQ_UNIT_READER provides a handle to a specific LDQ queue for the purpose of reading one or more LDQ units. The class implements the interface IF_LDQ_UNIT_READER.

UML Representation:

Attribute Overview:

No public or protected attributes.

Method overview:

Method

Visibility/Level

Description

GET_NEXT_STATES

Public Instance

Reads the next units'states. The method requires the number of units to read and returns a table of unit states.

GET_NEXT_CONTENTS

Public Instance

Reads the next units'contents. The method requires the number of units to read and returns a table of unit contents.

GET_TOTAL_NUMBER_OF_UNITS

Public Instance

Gets the total number of entries in the queue.

CONFIRM

Public Instance

Marks for deletion the units already read.

CHECK_READ_SEQUENCE

Private Static

Verify the order in which units have been read.

ON_ROLLBACK

Public Static

Roll Back Called LDQ Units.

AFTER_COMMIT

Public Static

Delete the internal tables.

ON_COMMIT

Public Static

Delete the read LDQ units in the database. All methods of LDQ classes persist their work in the database by an Explicit Commit, with the exception of the CONFIRM_QUEUE_UNITS method in the IF_LDQ_READER interface, which executes an Implicit Commit.

CLASS_CONSTRUCTOR

Public Static

Class constructor.

CONSTRUCTOR

Public Instance

Constructor.

Unit State Reader Class CL_LDQ_UNIT_STATE_READER

The class CL_LDQ_UNIT_STATE_READER reads the state data of one or more LDQ units, that is the unit size, unit format and unit id. The class implements the interface IF_LDQ_UNIT_STATE_READER.

UML Representation:

Attribute Overview:

No public or protected attributes.

Method overview:

Method

Visibility/Level

Description

GET_FORMAT

Public Instance

The method returns the format of the LDQ unit data.

GET_UNIT_ID

Public Instance

The method returns the Unit-ID of the LDQ unit.

GET_SEQUENCE_NUMBER

Public Instance

The method returns the sequence number of an LDQ unit.

GET_SUCCESSOR_COUNT

Public Instance

The method returns the number of following units in the queue.

GET_SIZE

Public Instance

The method returns the size of the LDQ unit data.

GET_DESCRIPTION

Public Instance

The method returns the appended description of an LDQ unit.

CONSTRUCTOR

Public Instance

Constructor. The constructor requires the state of the LDQ unit.

CHECK_COMMIT_ROLLBACK

Private Instance

The method checks, whether the LDQ unit is valid.

Unit Content Reader Class CL_LDQ_UNIT_CONTENT_READER

The class CL_LDQ_UNIT_CONTENT_READER reads the payload of one or more LDQ units in a specified LDQ queue.

UML Representation:

Attribute Overview:

No public or protected attributes.

Method overview:

Method

Visibility/Level

Description

GET_CDATA

Public Instance

The method reads character-like data. The method returns a character string.

GET_XDATA

Public Instance

The method reads binary data. The method returns a byte string.

GET_FORMAT

Public Instance

The method returns the format of the LDQ unit data.

GET_UNIT_ID

Public Instance

The method returns the Unit-ID of the LDQ unit.

GET_SEQUENCE_NUMBER

Public Instance

The method returns the sequence number of an LDQ unit.

GET_SUCCESSOR_COUNT

Public Instance

The method returns the number of following units in the queue.

GET_DESCRIPTION

Public Instance

The method returns the appended description of an LDQ unit.

GET_SIZE

Public Instance

The method returns the size of the LDQ unit data.

CONSTRUCTOR

Public Instance

Constructor, requiring a reference to an LDQ unit reader object, the unit state and the unit data.