CreateCursorDetails

class oci.streaming.models.CreateCursorDetails(**kwargs)

Bases: object

Object used to create a cursor to consume messages in a stream.

Attributes:

TYPE_AFTER_OFFSET

A constant which can be used with the type property of a CreateCursorDetails.

TYPE_AT_OFFSET

A constant which can be used with the type property of a CreateCursorDetails.

TYPE_AT_TIME

A constant which can be used with the type property of a CreateCursorDetails.

TYPE_LATEST

A constant which can be used with the type property of a CreateCursorDetails.

TYPE_TRIM_HORIZON

A constant which can be used with the type property of a CreateCursorDetails.

offset

Gets the offset of this CreateCursorDetails.

partition

[Required] Gets the partition of this CreateCursorDetails.

time

Gets the time of this CreateCursorDetails.

type

[Required] Gets the type of this CreateCursorDetails.

Methods:

__init__(**kwargs)

Initializes a new CreateCursorDetails object with values from keyword arguments.

TYPE_AFTER_OFFSET = 'AFTER_OFFSET'

A constant which can be used with the type property of a CreateCursorDetails. This constant has a value of “AFTER_OFFSET”

TYPE_AT_OFFSET = 'AT_OFFSET'

A constant which can be used with the type property of a CreateCursorDetails. This constant has a value of “AT_OFFSET”

TYPE_AT_TIME = 'AT_TIME'

A constant which can be used with the type property of a CreateCursorDetails. This constant has a value of “AT_TIME”

TYPE_LATEST = 'LATEST'

A constant which can be used with the type property of a CreateCursorDetails. This constant has a value of “LATEST”

TYPE_TRIM_HORIZON = 'TRIM_HORIZON'

A constant which can be used with the type property of a CreateCursorDetails. This constant has a value of “TRIM_HORIZON”

__init__(**kwargs)

Initializes a new CreateCursorDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • partition (str) – The value to assign to the partition property of this CreateCursorDetails.

  • type (str) – The value to assign to the type property of this CreateCursorDetails. Allowed values for this property are: “AFTER_OFFSET”, “AT_OFFSET”, “AT_TIME”, “LATEST”, “TRIM_HORIZON”

  • offset (int) – The value to assign to the offset property of this CreateCursorDetails.

  • time (datetime) – The value to assign to the time property of this CreateCursorDetails.

property offset

Gets the offset of this CreateCursorDetails. The offset to consume from if the cursor type is AT_OFFSET or AFTER_OFFSET.

Returns

The offset of this CreateCursorDetails.

Return type

int

property partition

[Required] Gets the partition of this CreateCursorDetails. The partition to get messages from.

Returns

The partition of this CreateCursorDetails.

Return type

str

property time

Gets the time of this CreateCursorDetails. The time to consume from if the cursor type is AT_TIME, expressed in RFC 3339 timestamp format.

Returns

The time of this CreateCursorDetails.

Return type

datetime

property type

[Required] Gets the type of this CreateCursorDetails. The type of cursor, which determines the starting point from which the stream will be consumed:

  • AFTER_OFFSET: The partition position immediately following the offset you specify. (Offsets are assigned when you successfully append a message to a partition in a stream.)

  • AT_OFFSET: The exact partition position indicated by the offset you specify.

  • AT_TIME: A specific point in time.

  • LATEST: The most recent message in the partition that was added after the cursor was created.

  • TRIM_HORIZON: The oldest message in the partition that is within the retention period window.

Allowed values for this property are: “AFTER_OFFSET”, “AT_OFFSET”, “AT_TIME”, “LATEST”, “TRIM_HORIZON”

Returns

The type of this CreateCursorDetails.

Return type

str