Search in sources :

Example 6 with SegmentSealedException

use of io.pravega.client.segment.impl.SegmentSealedException in project pravega by pravega.

the class SegmentTransactionImpl method flush.

@Override
public void flush() throws TxnFailedException {
    checkFailed();
    try {
        out.flush();
        synchronized (lock) {
            removeCompleted();
            checkFailed();
        }
    } catch (SegmentSealedException e) {
        throw new TxnFailedException(e);
    }
}
Also used : TxnFailedException(io.pravega.client.stream.TxnFailedException) SegmentSealedException(io.pravega.client.segment.impl.SegmentSealedException)

Aggregations

SegmentSealedException (io.pravega.client.segment.impl.SegmentSealedException)6 SegmentOutputStream (io.pravega.client.segment.impl.SegmentOutputStream)3 PendingEvent (io.pravega.client.stream.impl.PendingEvent)2 ByteBuffer (java.nio.ByteBuffer)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 Segment (io.pravega.client.segment.impl.Segment)1 TxnFailedException (io.pravega.client.stream.TxnFailedException)1 ArrayList (java.util.ArrayList)1 Entry (java.util.Map.Entry)1 Synchronized (lombok.Synchronized)1