Klasse TransactionRecoveryService
Vault operations cannot participate in the SQLite transaction. A process may terminate after an external money operation but before its next journal update. Therefore startup recovery never guesses whether money moved and never automatically repeats a withdrawal, refund, or payout.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTransactionRecoveryService(Database database, PurchaseRepository purchases, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads) Creates the recovery scanner.TransactionRecoveryService(Database database, PurchaseRepository purchases, SellbackRepository sellbacks, RentalRepository rentals, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads) Creates a recovery scanner for every durable money workflow.TransactionRecoveryService(Database database, PurchaseRepository purchases, SellbackRepository sellbacks, RentalRepository rentals, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads, int batchSize, int maximumReportEntries) Creates a bounded recovery scanner for every durable money workflow. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungconfirmPayout(UUID administratorId, UUID transactionId, String evidence) Completes a quarantined purchase after an administrator externally verifies seller payout.confirmRentalPayment(UUID administratorId, UUID paymentId, String evidence) Activates a quarantined rental or extension after independently verified payment.confirmRentalRefund(UUID administratorId, UUID paymentId, String evidence) Releases a quarantined rental or extension after independently verified refund.confirmSellbackPayout(UUID administratorId, UUID transactionId, String evidence) Completes a quarantined sellback after independently verified seller payout.confirmSellbackRefund(UUID administratorId, UUID transactionId, String evidence) Restores a quarantined sellback after independently verified payout reversal.retryProtection(UUID administratorId, UUID transactionId) Reapplies only the idempotent WorldGuard ownership step of a quarantined purchase.scan()Finds and quarantines every nonterminal purchase, sellback, and rental payment journal.
-
Konstruktordetails
-
TransactionRecoveryService
public TransactionRecoveryService(Database database, PurchaseRepository purchases, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads) Creates the recovery scanner.- Parameter:
database- asynchronous database executorpurchases- purchase journal repositoryestates- estate repository used for audit entriesworldGuard- WorldGuard adapterthreads- main-thread bridge
-
TransactionRecoveryService
public TransactionRecoveryService(Database database, PurchaseRepository purchases, SellbackRepository sellbacks, RentalRepository rentals, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads) Creates a recovery scanner for every durable money workflow.- Parameter:
database- asynchronous database executorpurchases- purchase journal repositorysellbacks- sellback journal repositoryrentals- rental payment repositoryestates- estate repository used for quarantine and audit entriesworldGuard- WorldGuard adapterthreads- main-thread bridge
-
TransactionRecoveryService
public TransactionRecoveryService(Database database, PurchaseRepository purchases, SellbackRepository sellbacks, RentalRepository rentals, EstateRepository estates, WorldGuardGateway worldGuard, ThreadBridge threads, int batchSize, int maximumReportEntries) Creates a bounded recovery scanner for every durable money workflow.- Parameter:
database- asynchronous database executorpurchases- purchase journal repositorysellbacks- sellback journal repositoryrentals- rental payment repositoryestates- estate repository used for quarantine and audit entriesworldGuard- WorldGuard adapterthreads- main-thread bridgebatchSize- maximum journals processed by one database taskmaximumReportEntries- maximum identifiers and details retained in memory
-
-
Methodendetails
-
scan
Finds and quarantines every nonterminal purchase, sellback, and rental payment journal.- Gibt zurück:
- future containing the complete recovery report
-
retryProtection
Reapplies only the idempotent WorldGuard ownership step of a quarantined purchase.The retry is allowed only when SQLite already names the transaction buyer as owner. It deliberately leaves the journal in manual review because seller payout cannot be proven or repeated safely through Vault.
- Parameter:
administratorId- administrator requesting the retrytransactionId- quarantined purchase identifier- Gibt zurück:
- completion future
-
confirmPayout
public CompletableFuture<Void> confirmPayout(UUID administratorId, UUID transactionId, String evidence) Completes a quarantined purchase after an administrator externally verifies seller payout.WorldGuard ownership is idempotently reapplied before the SQLite compare-and-set. This operation never moves money through Vault; the evidence must reference an independently verified payout record.
- Parameter:
administratorId- resolving administratortransactionId- quarantined purchase identifierevidence- external payout verification reference- Gibt zurück:
- completion future
-
confirmSellbackPayout
public CompletableFuture<Void> confirmSellbackPayout(UUID administratorId, UUID transactionId, String evidence) Completes a quarantined sellback after independently verified seller payout.No Vault operation is performed. WorldGuard is first set idempotently to the intended recipient, after which SQLite atomically completes ownership, journal, and audit state.
- Parameter:
administratorId- resolving administratortransactionId- quarantined sellback identifierevidence- external payout verification reference- Gibt zurück:
- completion future
-
confirmSellbackRefund
public CompletableFuture<Void> confirmSellbackRefund(UUID administratorId, UUID transactionId, String evidence) Restores a quarantined sellback after independently verified payout reversal.This path is allowed only while SQLite still proves seller ownership. It never withdraws or deposits money and preserves the seller's stored member set.
- Parameter:
administratorId- resolving administratortransactionId- quarantined sellback identifierevidence- external refund verification reference- Gibt zurück:
- completion future
-
confirmRentalPayment
public CompletableFuture<Void> confirmRentalPayment(UUID administratorId, UUID paymentId, String evidence) Activates a quarantined rental or extension after independently verified payment.- Parameter:
administratorId- resolving administratorpaymentId- quarantined rental payment identifierevidence- external payment verification reference- Gibt zurück:
- completion future
-
confirmRentalRefund
public CompletableFuture<Void> confirmRentalRefund(UUID administratorId, UUID paymentId, String evidence) Releases a quarantined rental or extension after independently verified refund.- Parameter:
administratorId- resolving administratorpaymentId- quarantined rental payment identifierevidence- external refund verification reference- Gibt zurück:
- completion future
-