public ByteStreamClientImpl(String scope, Controller controller, ConnectionFactory connectionFactory) { this.scope = Preconditions.checkNotNull(scope); this.controller = Preconditions.checkNotNull(controller); this.connectionFactory = Preconditions.checkNotNull(connectionFactory); this.inputStreamFactory = new SegmentInputStreamFactoryImpl(controller, connectionFactory); this.outputStreamFactory = new SegmentOutputStreamFactoryImpl(controller, connectionFactory); this.metaStreamFactory = new SegmentMetadataClientFactoryImpl(controller, connectionFactory); }
public BatchClientFactoryImpl(Controller controller, ConnectionFactory connectionFactory) { this.controller = controller; this.connectionFactory = connectionFactory; this.inputStreamFactory = new SegmentInputStreamFactoryImpl(controller, connectionFactory); this.segmentMetadataClientFactory = new SegmentMetadataClientFactoryImpl(controller, connectionFactory); this.streamCutHelper = new StreamCutHelper(controller, connectionFactory); this.latestDelegationToken = new AtomicReference<>(); }
/** * Creates a new instance of the ClientFactory class. * Note: ConnectionFactory and Controller is closed when {@link ClientFactoryImpl#close()} is invoked. * * @param scope The scope string. * @param controller The reference to Controller. * @param connectionFactory The reference to Connection Factory impl. */ @VisibleForTesting public ClientFactoryImpl(String scope, Controller controller, ConnectionFactory connectionFactory) { this(scope, controller, connectionFactory, new SegmentInputStreamFactoryImpl(controller, connectionFactory), new SegmentOutputStreamFactoryImpl(controller, connectionFactory), new ConditionalOutputStreamFactoryImpl(controller, connectionFactory), new SegmentMetadataClientFactoryImpl(controller, connectionFactory)); }
/** * Creates a new instance of ClientFactory class. * Note: Controller is closed when {@link ClientFactoryImpl#close()} is invoked. * * @param scope The scope string. * @param controller The reference to Controller. */ public ClientFactoryImpl(String scope, Controller controller) { Preconditions.checkNotNull(scope); Preconditions.checkNotNull(controller); this.scope = scope; this.controller = controller; this.connectionFactory = new ConnectionFactoryImpl(ClientConfig.builder().build()); this.inFactory = new SegmentInputStreamFactoryImpl(controller, connectionFactory); this.outFactory = new SegmentOutputStreamFactoryImpl(controller, connectionFactory); this.condFactory = new ConditionalOutputStreamFactoryImpl(controller, connectionFactory); this.metaFactory = new SegmentMetadataClientFactoryImpl(controller, connectionFactory); }
SegmentInputStreamFactoryImpl segmentConsumerClient = new SegmentInputStreamFactoryImpl(controller, clientCF);
SegmentInputStreamFactoryImpl segmentConsumerClient = new SegmentInputStreamFactoryImpl(controller, clientCF);