Search in sources :

Example 1 with BatchClientFactoryImpl

use of io.pravega.client.batch.impl.BatchClientFactoryImpl in project pravega by pravega.

the class BatchClientFactory method withScope.

/**
 * Creates a new instance of BatchClientFactory.
 *
 * @param scope The scope of the stream.
 * @param config Configuration for the client.
 * @return Instance of BatchClientFactory implementation.
 */
static BatchClientFactory withScope(String scope, ClientConfig config) {
    val connectionFactory = new SocketConnectionFactoryImpl(config);
    ControllerImpl controller = new ControllerImpl(ControllerImplConfig.builder().clientConfig(config).build(), connectionFactory.getInternalExecutor());
    return new BatchClientFactoryImpl(controller, config, connectionFactory);
}
Also used : lombok.val(lombok.val) ControllerImpl(io.pravega.client.control.impl.ControllerImpl) SocketConnectionFactoryImpl(io.pravega.client.connection.impl.SocketConnectionFactoryImpl) BatchClientFactoryImpl(io.pravega.client.batch.impl.BatchClientFactoryImpl)

Aggregations

BatchClientFactoryImpl (io.pravega.client.batch.impl.BatchClientFactoryImpl)1 SocketConnectionFactoryImpl (io.pravega.client.connection.impl.SocketConnectionFactoryImpl)1 ControllerImpl (io.pravega.client.control.impl.ControllerImpl)1 lombok.val (lombok.val)1