Skip to main content

Position

Struct Position 

Source
pub struct Position {
    pub commit_scn: u64,
    pub restart_scn: u64,
    pub committed_xids: Vec<String>,
    pub resetlogs_scn: Option<u64>,
    pub pdb_incarnation_scn: Option<u64>,
}
Expand description

A resume position.

Fields§

§commit_scn: u64

Highest emitted commit SCN.

§restart_scn: u64

First SCN to mine on resume.

§committed_xids: Vec<String>

Transactions already emitted at exactly commit_scn.

§resetlogs_scn: Option<u64>

RESETLOGS_CHANGE# of the incarnation the position belongs to; absent in bookmarks written before it was recorded.

§pdb_incarnation_scn: Option<u64>

INCARNATION_SCN of the pluggable database’s current incarnation (V$PDB_INCARNATION), when the source is connected to a PDB: a PDB point-in-time recovery or flashback starts a new one without a database-wide RESETLOGS.

Implementations§

Source§

impl Position

Source

pub fn at(scn: u64, restart: u64) -> Self

A position at scn with nothing emitted there, resuming from restart (which must not exceed scn + 1).

Source

pub fn bind_incarnation(&mut self, current: u64) -> Result<(), FaucetError>

Tie the position to the database incarnation whose RESETLOGS_CHANGE# is current, refusing a position taken in another incarnation (after a point-in-time recovery or flashback its later SCNs name changes that no longer exist, and the new branch reuses them).

Source

pub fn bind_pdb_incarnation( &mut self, current: Option<u64>, ) -> Result<(), FaucetError>

Tie the position to the PDB incarnation that began at current (None outside a PDB, or when it could not be read), refusing a position taken in another one — a PDB point-in-time recovery or flashback, which leaves the database’s RESETLOGS SCN unchanged.

Source

pub fn resume_from(current_scn: u64, oldest_open_start: Option<u64>) -> Self

Where to anchor a fresh capture: at current_scn, reaching back to the oldest open transaction’s start so it is captured whole. A start of 0 is no position at all (#843) and anchors at current_scn like no open transaction does.

Source

pub fn already_emitted(&self, commit_scn: u64, xid: &str) -> bool

True when the transaction xid committing at commit_scn was already emitted before this position.

Source

pub fn record_commit( &mut self, commit_scn: u64, xid: &str, oldest_open: Option<u64>, )

Record that xid committed at commit_scn was emitted, with the oldest still-open transaction starting at oldest_open (if any).

Source

pub fn advance_to(&mut self, end_scn: u64, oldest_open: Option<u64>)

Advance past a fully-mined window ending at end_scn (inclusive).

Source

pub fn to_value(&self) -> Value

Serialize for the state store.

Source

pub fn from_value(v: &Value) -> Result<Self, FaucetError>

Parse a stored bookmark.

Trait Implementations§

Source§

impl Clone for Position

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Position

Source§

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

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

impl Eq for Position

Source§

impl PartialEq for Position

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Position

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more