pub struct PublicationServerRepositoryAccessMigration { /* private fields */ }
Expand description
Migrates the events, snapshots and info for the event-sourced RepositoryAccess. There is no need to migrate the mutable RepositoryContent structure for this migration.
Implementations§
source§impl PublicationServerRepositoryAccessMigration
impl PublicationServerRepositoryAccessMigration
pub fn upgrade( mode: UpgradeMode, config: &Config, versions: &UpgradeVersions ) -> UpgradeResult<()>
Trait Implementations§
source§impl UpgradeAggregateStorePre0_14 for PublicationServerRepositoryAccessMigration
impl UpgradeAggregateStorePre0_14 for PublicationServerRepositoryAccessMigration
type Aggregate = RepositoryAccess
type OldInitEvent = Pre0_10RepositoryAccessInitDetails
type OldEvent = Pre0_10RepositoryAccessEventDetails
type OldStorableDetails = StorableRepositoryCommand
fn store_name(&self) -> &str
fn deployed_store(&self) -> &KeyValueStore
fn preparation_key_value_store(&self) -> &KeyValueStore
fn preparation_aggregate_store(&self) -> &AggregateStore<Self::Aggregate>
source§fn convert_init_event(
&self,
old_init: Self::OldInitEvent,
handle: MyHandle,
actor: String,
time: Time
) -> UpgradeResult<StoredCommand<Self::Aggregate>>
fn convert_init_event( &self, old_init: Self::OldInitEvent, handle: MyHandle, actor: String, time: Time ) -> UpgradeResult<StoredCommand<Self::Aggregate>>
Implement this to convert the old init event to a new
StoredCommand for the init.
source§fn convert_old_command(
&self,
old_command: OldStoredCommand<Self::OldStorableDetails>,
old_effect: UnconvertedEffect<Self::OldEvent>,
version: u64
) -> UpgradeResult<CommandMigrationEffect<Self::Aggregate>>
fn convert_old_command( &self, old_command: OldStoredCommand<Self::OldStorableDetails>, old_effect: UnconvertedEffect<Self::OldEvent>, version: u64 ) -> UpgradeResult<CommandMigrationEffect<Self::Aggregate>>
Implement this to convert an old command and convert the
included old events. Read more
source§fn post_command_migration(&self, handle: &MyHandle) -> UpgradeResult<()>
fn post_command_migration(&self, handle: &MyHandle) -> UpgradeResult<()>
Override this to get a call when the migration of commands for
an aggregate is done.
source§fn upgrade(&self, mode: UpgradeMode) -> UpgradeResult<AspaMigrationConfigs>
fn upgrade(&self, mode: UpgradeMode) -> UpgradeResult<AspaMigrationConfigs>
Upgrades pre 0.14.x AggregateStore. Read more
source§fn preparation_store_prepare(&self) -> UpgradeResult<()>
fn preparation_store_prepare(&self) -> UpgradeResult<()>
Saves the version of the target upgrade. Wipes the store if there is another
version set as the target.
fn report_remaining_work( total_remaining: usize, handle: &MyHandle, data_upgrade_info: &DataUpgradeInfo ) -> UpgradeResult<()>
fn store_new_command( &self, scope: &Scope, command: &StoredCommand<Self::Aggregate> ) -> UpgradeResult<()>
fn data_upgrade_info_key(scope: Scope) -> Key
source§fn data_upgrade_info(&self, scope: &Scope) -> UpgradeResult<DataUpgradeInfo>
fn data_upgrade_info(&self, scope: &Scope) -> UpgradeResult<DataUpgradeInfo>
Return the DataUpgradeInfo telling us to where we got to with this migration.
source§fn update_data_upgrade_info(
&self,
scope: &Scope,
info: &DataUpgradeInfo
) -> UpgradeResult<()>
fn update_data_upgrade_info( &self, scope: &Scope, info: &DataUpgradeInfo ) -> UpgradeResult<()>
Update the DataUpgradeInfo
source§fn clean_migration_help_files(&self) -> UpgradeResult<()>
fn clean_migration_help_files(&self) -> UpgradeResult<()>
Clean up keys used for tracking migration progress
source§fn command_keys(
&self,
scope: &Scope,
from: u64
) -> Result<Vec<Key>, UpgradeError>
fn command_keys( &self, scope: &Scope, from: u64 ) -> Result<Vec<Key>, UpgradeError>
Find all command keys for the scope, starting from the provided sequence. Then sort them
by sequence and turn them back into key store keys for further processing.
fn get<V: DeserializeOwned>(&self, key: &Key) -> Result<V, UpgradeError>
fn event_key(scope: Scope, nr: u64) -> Key
fn new_stored_command_key(scope: Scope, version: u64) -> Key
Auto Trait Implementations§
impl !RefUnwindSafe for PublicationServerRepositoryAccessMigration
impl Send for PublicationServerRepositoryAccessMigration
impl Sync for PublicationServerRepositoryAccessMigration
impl Unpin for PublicationServerRepositoryAccessMigration
impl !UnwindSafe for PublicationServerRepositoryAccessMigration
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
Mutably borrows from an owned value. Read more