Package io.pravega.client.stream
Interface TransactionalEventStreamWriter<Type>
- 
- All Superinterfaces:
- java.lang.AutoCloseable
 
 public interface TransactionalEventStreamWriter<Type> extends java.lang.AutoCloseableA writer that writes Events to an Event stream transactionally. All events that are written as part of a transaction can be committed atomically by callingTransaction.commit(). This will result in either all of those events going into the stream or none of them and the commit call failing with an exception. Prior to committing a transaction, the events written to it cannot be read or otherwise seen by readers.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Transaction<Type>beginTxn()Start a new transaction on this stream.voidclose()Closes the writer.EventWriterConfiggetConfig()Returns the configuration that this writer was created with.Transaction<Type>getTxn(java.util.UUID transactionId)Returns a previously created transaction.
 
- 
- 
- 
Method Detail- 
beginTxnTransaction<Type> beginTxn() Start a new transaction on this stream. This allows events written to the transaction be written an committed atomically. Note that transactions can only be open forEventWriterConfig.transactionTimeoutTime.- Returns:
- A transaction through which multiple events can be written atomically.
 
 - 
getTxnTransaction<Type> getTxn(java.util.UUID transactionId) Returns a previously created transaction.- Parameters:
- transactionId- The result retained from calling- Transaction.getTxnId()
- Returns:
- Transaction object with given UUID
 
 - 
getConfigEventWriterConfig getConfig() Returns the configuration that this writer was created with.- Returns:
- Writer configuration
 
 - 
closevoid close() Closes the writer. (No further methods may be called)- Specified by:
- closein interface- java.lang.AutoCloseable
 
 
- 
 
-