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: u64Highest emitted commit SCN.
restart_scn: u64First 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
impl Position
Sourcepub fn at(scn: u64, restart: u64) -> Self
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).
Sourcepub fn bind_incarnation(&mut self, current: u64) -> Result<(), FaucetError>
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).
Sourcepub fn bind_pdb_incarnation(
&mut self,
current: Option<u64>,
) -> Result<(), FaucetError>
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.
Sourcepub fn resume_from(current_scn: u64, oldest_open_start: Option<u64>) -> Self
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.
Sourcepub fn already_emitted(&self, commit_scn: u64, xid: &str) -> bool
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.
Sourcepub fn record_commit(
&mut self,
commit_scn: u64,
xid: &str,
oldest_open: Option<u64>,
)
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).
Sourcepub fn advance_to(&mut self, end_scn: u64, oldest_open: Option<u64>)
pub fn advance_to(&mut self, end_scn: u64, oldest_open: Option<u64>)
Advance past a fully-mined window ending at end_scn (inclusive).
Sourcepub fn from_value(v: &Value) -> Result<Self, FaucetError>
pub fn from_value(v: &Value) -> Result<Self, FaucetError>
Parse a stored bookmark.
Trait Implementations§
impl Eq for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Forget for Position
impl Freeze for Position
impl Move for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.