Interface TransactionalSubscriber<V>
- Type Parameters:
- V- the value handled by this subscriber
- All Superinterfaces:
- Subscriber<V>
- All Known Subinterfaces:
- Processor.Transactional<I,,- O> - Processor.TransactionalIso<V>
beginTransaction, followed by a commit
 or rollback.
 A transactional subscriber will only be fully effective when controlled by
 a transaction-aware processor. A
 transaction-aware processor will roll back all subscribers if the transaction
 fails on any one subscriber, where a standard publisher will not.
- Since:
- 4.0.0
- 
Method SummaryMethods inherited from interface org.spongepowered.configurate.reactive.SubscriberonClose, onError
- 
Method Details- 
submitDescription copied from interface:SubscriberCalled to submit a new item.- Specified by:
- submitin interface- Subscriber<V>
- Parameters:
- item- the item available
 
- 
beginTransactionReceive a new value, and validate it.The received value must not be made available outside of to other transaction-aware viewers until commit()has been called.- Parameters:
- newValue- the new value
- Throws:
- TransactionFailedException- if the new value does not validate
- Since:
- 4.0.0
 
- 
commitvoid commit()Expose a transaction's result.This method will be called on all transactional subscribers in a system have received and validated any new data. Calling this method when a transaction is not in progress should result in a noop. - Since:
- 4.0.0
 
- 
rollbackvoid rollback()Called when a transaction has failed, to revert any prepared changes.This event indicates that it is safe for clients to discard any prepared information from an in-progress transaction. If there is no transaction in progress, this must be a no-op. - Since:
- 4.0.0
 
 
-