Search in sources :

Example 6 with SegmentInputStreamFactoryImpl

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

the class ByteStreamTest method createClientFactory.

ByteStreamClientFactory createClientFactory(String scope) {
    ClientConfig config = ClientConfig.builder().build();
    ConnectionFactory connectionFactory = new SocketConnectionFactoryImpl(config);
    ConnectionPool pool = new ConnectionPoolImpl(config, connectionFactory);
    val inputStreamFactory = new SegmentInputStreamFactoryImpl(PRAVEGA.getLocalController(), pool);
    val outputStreamFactory = new SegmentOutputStreamFactoryImpl(PRAVEGA.getLocalController(), pool);
    val metaStreamFactory = new SegmentMetadataClientFactoryImpl(PRAVEGA.getLocalController(), pool);
    return new ByteStreamClientImpl(scope, PRAVEGA.getLocalController(), pool, inputStreamFactory, outputStreamFactory, metaStreamFactory);
}
Also used : ConnectionPool(io.pravega.client.connection.impl.ConnectionPool) lombok.val(lombok.val) ConnectionFactory(io.pravega.client.connection.impl.ConnectionFactory) SegmentOutputStreamFactoryImpl(io.pravega.client.segment.impl.SegmentOutputStreamFactoryImpl) ConnectionPoolImpl(io.pravega.client.connection.impl.ConnectionPoolImpl) SegmentMetadataClientFactoryImpl(io.pravega.client.segment.impl.SegmentMetadataClientFactoryImpl) SegmentInputStreamFactoryImpl(io.pravega.client.segment.impl.SegmentInputStreamFactoryImpl) ClientConfig(io.pravega.client.ClientConfig) SocketConnectionFactoryImpl(io.pravega.client.connection.impl.SocketConnectionFactoryImpl) ByteStreamClientImpl(io.pravega.client.byteStream.impl.ByteStreamClientImpl)

Aggregations

SegmentInputStreamFactoryImpl (io.pravega.client.segment.impl.SegmentInputStreamFactoryImpl)6 ConnectionPoolImpl (io.pravega.client.connection.impl.ConnectionPoolImpl)5 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)5 SegmentOutputStreamFactoryImpl (io.pravega.client.segment.impl.SegmentOutputStreamFactoryImpl)4 ByteStreamClientImpl (io.pravega.client.byteStream.impl.ByteStreamClientImpl)3 Segment (io.pravega.client.segment.impl.Segment)3 SegmentMetadataClientFactoryImpl (io.pravega.client.segment.impl.SegmentMetadataClientFactoryImpl)3 MockController (io.pravega.client.stream.mock.MockController)3 Cleanup (lombok.Cleanup)3 lombok.val (lombok.val)3 Test (org.junit.Test)3 ClientConfig (io.pravega.client.ClientConfig)2 ConnectionFactory (io.pravega.client.connection.impl.ConnectionFactory)2 ConnectionPool (io.pravega.client.connection.impl.ConnectionPool)2 Controller (io.pravega.client.control.impl.Controller)2 ControllerImpl (io.pravega.client.control.impl.ControllerImpl)2 ConditionalOutputStreamFactoryImpl (io.pravega.client.segment.impl.ConditionalOutputStreamFactoryImpl)2 EventSegmentReader (io.pravega.client.segment.impl.EventSegmentReader)2 StreamSegmentStore (io.pravega.segmentstore.contracts.StreamSegmentStore)2 TableStore (io.pravega.segmentstore.contracts.tables.TableStore)2