Package io.pravega.client.segment.impl
Class SegmentOutputStreamFactoryImpl
- java.lang.Object
-
- io.pravega.client.segment.impl.SegmentOutputStreamFactoryImpl
-
- All Implemented Interfaces:
SegmentOutputStreamFactory
public class SegmentOutputStreamFactoryImpl extends java.lang.Object implements SegmentOutputStreamFactory
-
-
Constructor Summary
Constructors Constructor Description SegmentOutputStreamFactoryImpl(Controller controller, ConnectionPool cp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentOutputStreamcreateOutputStreamForSegment(Segment segment, EventWriterConfig config, DelegationTokenProvider tokenProvider)Creates a SegmentOutputStream for an existing segment.SegmentOutputStreamcreateOutputStreamForSegment(Segment segment, java.util.function.Consumer<Segment> segmentSealedCallback, EventWriterConfig config, DelegationTokenProvider tokenProvider)Creates a stream for an existing segment.SegmentOutputStreamcreateOutputStreamForTransaction(Segment segment, java.util.UUID txId, EventWriterConfig config, DelegationTokenProvider tokenProvider)Creates a stream for an open transaction.
-
-
-
Constructor Detail
-
SegmentOutputStreamFactoryImpl
@ConstructorProperties({"controller","cp"}) public SegmentOutputStreamFactoryImpl(Controller controller, ConnectionPool cp)
-
-
Method Detail
-
createOutputStreamForTransaction
public SegmentOutputStream createOutputStreamForTransaction(Segment segment, java.util.UUID txId, EventWriterConfig config, DelegationTokenProvider tokenProvider)
Description copied from interface:SegmentOutputStreamFactoryCreates a stream for an open transaction. This will fail if the segment does not exist or is sealed. This may be called multiple times for the same transaction.- Specified by:
createOutputStreamForTransactionin interfaceSegmentOutputStreamFactory- Parameters:
segment- The segment the transaction belongs to.txId- The transaction id.config- The configuration for the writertokenProvider- TheDelegationTokenProviderinstance to be used for obtaining a delegation token.- Returns:
- New instance of SegmentOutputStream with an open transaction.
-
createOutputStreamForSegment
public SegmentOutputStream createOutputStreamForSegment(Segment segment, java.util.function.Consumer<Segment> segmentSealedCallback, EventWriterConfig config, DelegationTokenProvider tokenProvider)
Description copied from interface:SegmentOutputStreamFactoryCreates a stream for an existing segment. This operation will fail if the segment does not exist or is sealed. This operation may be called multiple times on the same segment from the same or different clients (i.e., there can be concurrent Stream Writers in the same process space).- Specified by:
createOutputStreamForSegmentin interfaceSegmentOutputStreamFactory- Parameters:
segment- The segment.segmentSealedCallback- Method to be executed on receiving SegmentSealed from SSS.config- The configuration for the writertokenProvider- TheDelegationTokenProviderinstance to be used for obtaining a delegation token.- Returns:
- New instance of SegmentOutputStream for writing.
-
createOutputStreamForSegment
public SegmentOutputStream createOutputStreamForSegment(Segment segment, EventWriterConfig config, DelegationTokenProvider tokenProvider)
Description copied from interface:SegmentOutputStreamFactoryCreates a SegmentOutputStream for an existing segment. This operation will fail if the segment does not exist or is sealed. This operation may be called multiple times on the same segment from the same or different clients (i.e., there can be concurrent Stream Writers in the same process space).- Specified by:
createOutputStreamForSegmentin interfaceSegmentOutputStreamFactory- Parameters:
segment- The segment.config- The configuration for the writertokenProvider- TheDelegationTokenProviderinstance to be used for obtaining a delegation token.- Returns:
- New instance of SegmentOutputStream for writing.
-
-