dpiSubscrCreateParams

Struct dpiSubscrCreateParams 

Source
#[repr(C)]
pub struct dpiSubscrCreateParams {
Show 19 fields pub subscrNamespace: dpiSubscrNamespace, pub protocol: dpiSubscrProtocol, pub qos: dpiSubscrQOS, pub operations: dpiOpCode, pub portNumber: u32, pub timeout: u32, pub name: *const c_char, pub nameLength: u32, pub callback: dpiSubscrCallback, pub callbackContext: *mut c_void, pub recipientName: *const c_char, pub recipientNameLength: u32, pub ipAddress: *const c_char, pub ipAddressLength: u32, pub groupingClass: u8, pub groupingValue: u32, pub groupingType: u8, pub outRegId: u64, pub clientInitiated: c_int,
}
Expand description

This structure is used for creating subscriptions to messages sent for object change notification, query change notification or advanced queuing. All members are initialized to default values using the dpiContext_initSubscrCreateParams() function.

Fields§

§subscrNamespace: dpiSubscrNamespace

Specifies the namespace in which the subscription is created. It is expected to be one of the values from the enumeration dpiSubscrNamespace. The default value is DPI_SUBSCR_NAMESPACE_DBCHANGE.

§protocol: dpiSubscrProtocol

Specifies the protocol used for sending notifications for the subscription. It is expected to be one of the values from the enumeration dpiSubscrProtocol. The default value is DPI_SUBSCR_PROTO_CALLBACK.

§qos: dpiSubscrQOS

Specifies the quality of service flags to use with the subscription. It is expected to be one or more of the values from the enumeration dpiSubscrQOS, OR’ed together. The default value is to have no flags set.

§operations: dpiOpCode

Specifies which operations on the registered tables or queries should result in notifications. It is expected to be one or more of the values from the enumeration dpiOpCode, OR’ed together. The default value is DPI_OPCODE_ALL_OPS.

§portNumber: u32

Specifies the port number on which to receive notifications. The default value is 0, which means that a port number will be selected by the Oracle client.

§timeout: u32

Specifies the length of time, in seconds, before the subscription is unregistered. If the value is 0, the subscription remains active until explicitly unregistered. The default value is 0.

§name: *const c_char

Specifies the name of the subscription, as a byte string in the encoding used for CHAR data. This name must be consistent with the namespace identified in the [dpiSubscrCreateParams.subscrNamespace] member. The default value is NULL.

§nameLength: u32

Specifies the length of the [dpiSubscrCreateParams.name] member, in bytes. The default value is 0.

§callback: dpiSubscrCallback

Specifies the callback that will be called when a notification is sent to the subscription, if the [dpiSubscrCreateParams.protocol] member is set to DPI_SUBSCR_PROTO_CALLBACK. The callback accepts the following arguments:

The default value is NULL. If a callback is specified and a notification is sent, this will be performed on a separate thread. If database operations are going to take place, ensure that the create mode DPI_MODE_CREATE_THREADED is set in the structure dpiCommonCreateParams when creating the session pool or standalone connection that will be used in this callback.

§callbackContext: *mut c_void

Specifies the value that will be used as the first argument to the callback specified in the [dpiSubscrCreateParams.callback] member. The default value is NULL.

§recipientName: *const c_char

Specifies the name of the recipient to which notifications are sent when the [dpiSubscrCreateParams.protocol] member is not set to DPI_SUBSCR_PROTO_CALLBACK. The value is expected to be a byte string in the encoding used for CHAR data. The default value is NULL.

§recipientNameLength: u32

Specifies the length of the [dpiSubscrCreateParams.recipientName] member, in bytes. The default value is 0.

§ipAddress: *const c_char

Specifies the IP address on which the subscription listens to receive notifications. The IP address can be an IPv4 address in dotted decimal format such as 192.1.2.34 or an IPv6 address in hexadecimal format such as 2001:0db8:0000:0000:0217:f2ff:fe4b:4ced. The default value is NULL which means that an IP address will be selected by the Oracle client.

§ipAddressLength: u32

Specifies the length of the [dpiSubscrCreateParams.ipAddress] member, in bytes. The default value is 0.

§groupingClass: u8

Specifies the grouping class to use when grouping events. It should be one of the values from the enumeration dpiSubscrGroupingClass. The default value is 0. If this value is 0, the groupingValue and groupingType attributes are ignored.

§groupingValue: u32

Specifies the value to be used in grouping. The meaning of this value depends on the value of the groupingClass attribute. For time based grouping this value refers to the number of seconds during which events will be grouped together. The default value is 0.

§groupingType: u8

Specifies the type of grouping to use when grouping events. It should be one of the values from the enumeration dpiSubscrGroupingType. The default value is DPI_SUBSCR_GROUPING_TYPE_SUMMARY.

§outRegId: u64

Specifies the registration id of the subscription that corresponds to the REG_ID column in the USER_SUBSCR_REGISTRATIONS and DBA_SUBSCR_REGISTRATIONS views in the database. It will be populated for CQN registrations after a successful call to dpiConn_subscribe().

§clientInitiated: c_int

Specifies whether a client initiated connection should be created (1) or a server initiated connection should be created (0). The default value is 0. This feature is only available when Oracle Client 19.4 and Oracle Database 19.4 or higher are being used.

Trait Implementations§

Source§

impl Clone for dpiSubscrCreateParams

Source§

fn clone(&self) -> dpiSubscrCreateParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for dpiSubscrCreateParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for dpiSubscrCreateParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for dpiSubscrCreateParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.