ocilib::Enqueue Class Reference

Enqueue object for queuing messages into an Oracle Queue. More...

`#include <ocilib.hpp>`

Inherits ocilib::HandleHolder< OCI_Enqueue *>.

## Public Types

enum | EnqueueModeValues { Before = OCI_ASD_BEFORE, OnTop = OCI_ASD_TOP }
| Message enqueuing mode enumerated values. More...
enum | EnqueueVisibilityValues { Immediate = OCI_AMV_IMMEDIATE, OnCommit = OCI_AMV_ON_COMMIT }
| Message visibility enumerated values. More...
typedef Enum< EnqueueModeValues > | EnqueueMode
| Message enqueuing mode. More...
typedef Enum< EnqueueVisibilityValues > | EnqueueVisibility
| Message visibility after begin queued. More...

## Public Member Functions

| Enqueue (const TypeInfo &typeInfo, const ostring &queueName)
| Create a Enqueue object for the given queue. More...
void | Put (const Message &message)
| Enqueue a message the on queue associated to the Enqueue object. More...
EnqueueVisibility | GetVisibility () const
| Get the enqueuing/locking behavior. More...
void | SetVisibility (EnqueueVisibility value)
| Set whether the new message is enqueued as part of the current transaction. More...
EnqueueMode | GetMode () const
| Return the enqueuing mode of messages to enqueue. More...
void | SetMode (EnqueueMode value)
| Set the enqueuing mode of messages to put in the queue. More...
Raw | GetRelativeMsgID () const
| Get the current associated message identifier used for enqueuing messages using a sequence deviation. More...
void | SetRelativeMsgID (const Raw &value)
| Set a message identifier to use for enqueuing messages using a sequence deviation. More...

## Detailed Description

Enqueue object for queuing messages into an Oracle Queue.

This class wraps the OCILIB object handle OCI_Enqueue and its related methods

Definition at line 7659 of file ocilib.hpp.

## Member Typedef Documentation

## EnqueueMode

typedef Enum<EnqueueModeValues> ocilib::Enqueue::EnqueueMode

Message enqueuing mode.

Possible values are Enqueue::EnqueueModeValues

Definition at line 7683 of file ocilib.hpp.

## EnqueueVisibility

typedef Enum<EnqueueVisibilityValues> ocilib::Enqueue::EnqueueVisibility

Message visibility after begin queued.

Possible values are Enqueue::EnqueueVisibilityValues

Definition at line 7705 of file ocilib.hpp.

## Member Enumeration Documentation

## EnqueueModeValues

enum ocilib::Enqueue::EnqueueModeValues

Message enqueuing mode enumerated values.

Enumerator
Before | Enqueue message before another message
OnTop | Enqueue message before all messages

Definition at line 7668 of file ocilib.hpp.

## EnqueueVisibilityValues

enum ocilib::Enqueue::EnqueueVisibilityValues

Message visibility enumerated values.

Enumerator
Immediate | Enqueue is an independent transaction
OnCommit | Enqueue is part of current transaction

Definition at line 7690 of file ocilib.hpp.

## Constructor & Destructor Documentation

## Enqueue()

ocilib::Enqueue::Enqueue | ( | const TypeInfo & | typeInfo,
|  | const ostring & | queueName
| ) |  |

inline

Create a Enqueue object for the given queue.

Parameters

  typeInfo | - Type info handle
  queueName | - Queue name

Note
  OCILIB supports 2 types of message payload :
  - Oracle types (UDT)
  - RAW data
  Oracle Type AnyData is not supported in the current version of OCILIB
  the parameter 'typeInfo' indicates the type of payload to enqueue to the given queue :
  - For object payload, retrieve the object type information object from the given type name
  - For RAW payload, you MUST pass the object type information object from the type name "SYS.RAW" as object type name

Definition at line 6780 of file ocilib_impl.hpp.

References ocilib::Check(), OCI_EnqueueCreate(), and OCI_EnqueueFree().

## Member Function Documentation

## Put()

void ocilib::Enqueue::Put | ( | const Message & | message | ) |

inline

Enqueue a message the on queue associated to the Enqueue object.

Parameters

  message | - Message to enqueue

Definition at line 6785 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueuePut().

## GetVisibility()

Enqueue::EnqueueVisibility ocilib::Enqueue::GetVisibility | ( |  | ) | const

inline

Get the enqueuing/locking behavior.

Note
  see SetVisibility() for more details

Definition at line 6790 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueueGetVisibility().

## SetVisibility()

void ocilib::Enqueue::SetVisibility | ( | EnqueueVisibility | value | ) |

inline

Set whether the new message is enqueued as part of the current transaction.

Parameters

  value | - Enqueuing visibility

Note
  Default value is Enqueue::OnCommit

Definition at line 6795 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueueSetVisibility().

## GetMode()

Enqueue::EnqueueMode ocilib::Enqueue::GetMode | ( |  | ) | const

inline

Return the enqueuing mode of messages to enqueue.

Note
  see SetMode() for more details

Definition at line 6800 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueueGetSequenceDeviation().

## SetMode()

void ocilib::Enqueue::SetMode | ( | EnqueueMode | value | ) |

inline

Set the enqueuing mode of messages to put in the queue.

Parameters

  value | - enqueuing mode

Note
  Default value is Enqueue::OnTop
  if the parameter 'value' is set to Enqueue::Before, the application must call SetRelativeMsgID() before enqueuing the next message in the queue.
  In order to stop enqueuing message using a sequence deviation, call SetMode() with the value Enqueue::OnTop

Definition at line 6805 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueueSetSequenceDeviation().

## GetRelativeMsgID()

Raw ocilib::Enqueue::GetRelativeMsgID | ( |  | ) | const

inline

Get the current associated message identifier used for enqueuing messages using a sequence deviation.

Note
  see SetRelativeMsgID() for more details

Definition at line 6810 of file ocilib_impl.hpp.

References ocilib::Check(), ocilib::MakeRaw(), and OCI_EnqueueGetRelativeMsgID().

## SetRelativeMsgID()

void ocilib::Enqueue::SetRelativeMsgID | ( | const Raw & | value | ) |

inline

Set a message identifier to use for enqueuing messages using a sequence deviation.

Parameters

  value | - message identifier

Note
  This call is only valid if SetMode() has been called with the value Enqueue::Before
  see SetMode() for more details

Definition at line 6821 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EnqueueSetRelativeMsgID().