Search in sources :

Example 6 with SegmentOutputStreamFactoryImpl

use of io.pravega.client.segment.impl.SegmentOutputStreamFactoryImpl 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

ConnectionPoolImpl (io.pravega.client.connection.impl.ConnectionPoolImpl)6 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)6 SegmentOutputStreamFactoryImpl (io.pravega.client.segment.impl.SegmentOutputStreamFactoryImpl)6 SegmentInputStreamFactoryImpl (io.pravega.client.segment.impl.SegmentInputStreamFactoryImpl)4 SegmentMetadataClientFactoryImpl (io.pravega.client.segment.impl.SegmentMetadataClientFactoryImpl)4 ByteStreamClientImpl (io.pravega.client.byteStream.impl.ByteStreamClientImpl)3 Controller (io.pravega.client.control.impl.Controller)3 Segment (io.pravega.client.segment.impl.Segment)3 SegmentOutputStream (io.pravega.client.segment.impl.SegmentOutputStream)3 MockController (io.pravega.client.stream.mock.MockController)3 StreamSegmentStore (io.pravega.segmentstore.contracts.StreamSegmentStore)3 TableStore (io.pravega.segmentstore.contracts.tables.TableStore)3 PravegaConnectionListener (io.pravega.segmentstore.server.host.handler.PravegaConnectionListener)3 CompletableFuture (java.util.concurrent.CompletableFuture)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