Class SegmentOutputStreamFactoryImpl

    • Constructor Detail

      • SegmentOutputStreamFactoryImpl

        @ConstructorProperties({"controller","cp"})
        public SegmentOutputStreamFactoryImpl​(Controller controller,
                                              ConnectionPool cp)
    • Method Detail

      • createOutputStreamForSegment

        public SegmentOutputStream createOutputStreamForSegment​(Segment segment,
                                                                java.util.function.Consumer<Segment> segmentSealedCallback,
                                                                EventWriterConfig config,
                                                                DelegationTokenProvider tokenProvider)
        Description copied from interface: SegmentOutputStreamFactory
        Creates 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:
        createOutputStreamForSegment in interface SegmentOutputStreamFactory
        Parameters:
        segment - The segment.
        segmentSealedCallback - Method to be executed on receiving SegmentSealed from SSS.
        config - The configuration for the writer
        tokenProvider - The DelegationTokenProvider instance 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: SegmentOutputStreamFactory
        Creates 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:
        createOutputStreamForSegment in interface SegmentOutputStreamFactory
        Parameters:
        segment - The segment.
        config - The configuration for the writer
        tokenProvider - The DelegationTokenProvider instance to be used for obtaining a delegation token.
        Returns:
        New instance of SegmentOutputStream for writing.