Package com.clickhouse.data
Class ClickHouseDataStreamFactory
java.lang.Object
com.clickhouse.data.ClickHouseDataStreamFactory
Deprecated.
Factory class for creating objects to handle data stream.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classDeprecated. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePipedOutputStream(int bufferSize, int queueSize, int timeout) Deprecated.createPipedOutputStream(int bufferSize, int queueSize, int timeout, ClickHouseWriter writer) Deprecated.createPipedOutputStream(int bufferSize, int queueSize, int timeout, Runnable postCloseAction) Deprecated.Deprecated.Creates a piped output stream.createPipedOutputStream(ClickHouseDataConfig config, ClickHouseWriter writer) Deprecated.Creates a piped output stream.createPipedOutputStream(ClickHouseDataConfig config, Runnable postCloseAction) Deprecated.Creates a piped output stream.Deprecated.Gets default executor service for running blocking tasks.static ClickHouseDataStreamFactoryDeprecated.Gets instance of the factory class.getProcessor(ClickHouseDataConfig config, ClickHouseInputStream input, ClickHouseOutputStream output, Map<String, Serializable> settings, List<ClickHouseColumn> columns) Deprecated.Gets data processor according to givenClickHouseDataConfigand settings.Deprecated.Gets default scheduled executor service for scheduled tasks.static voidhandleCustomAction(Runnable postCloseAction) Deprecated.Handles custom action.<T> CompletableFuture<T>runBlockingTask(Supplier<T> supplier) Deprecated.Executes a blocking task usingCompletableFuture.supplyAsync(Supplier)and customExecutorService.scheduleTask(Runnable task, long delay, TimeUnit unit) Deprecated.Schedules a task usingScheduledExecutorService.schedule(Runnable, long, TimeUnit)and customScheduledExecutorService.
-
Field Details
-
ERROR_NO_DESERIALIZER
Deprecated.- See Also:
-
ERROR_NO_SERIALIZER
Deprecated.- See Also:
-
ERROR_UNSUPPORTED_FORMAT
Deprecated.- See Also:
-
-
Constructor Details
-
ClickHouseDataStreamFactory
public ClickHouseDataStreamFactory()Deprecated.
-
-
Method Details
-
handleCustomAction
Deprecated.Handles custom action.- Parameters:
postCloseAction- post close action, could be null- Throws:
IOException- when failed to execute post close action
-
getInstance
Deprecated.Gets instance of the factory class.- Returns:
- instance of the factory class
-
getExecutor
Deprecated.Gets default executor service for running blocking tasks.- Returns:
- non-null executor service
-
getScheduler
Deprecated.Gets default scheduled executor service for scheduled tasks.- Returns:
- non-null scheduled executor service
-
runBlockingTask
Deprecated.Executes a blocking task usingCompletableFuture.supplyAsync(Supplier)and customExecutorService.- Returns:
- non-null future to get result
-
scheduleTask
Deprecated.Schedules a task usingScheduledExecutorService.schedule(Runnable, long, TimeUnit)and customScheduledExecutorService.- Returns:
- non-null future to get result
-
getProcessor
public ClickHouseDataProcessor getProcessor(ClickHouseDataConfig config, ClickHouseInputStream input, ClickHouseOutputStream output, Map<String, Serializable> settings, List<ClickHouseColumn> columns) throws IOExceptionDeprecated.Gets data processor according to givenClickHouseDataConfigand settings.- Parameters:
config- non-null configuration containing information likeClickHouseFormatinput- input stream for deserialization, must not be null whenoutputis nulloutput- output stream for serialization, must not be null wheninputis nullsettings- nullable settingscolumns- nullable list of columns- Returns:
- data processor, which might be null
- Throws:
IOException- when failed to read columns from input stream
-
createPipedOutputStream
Deprecated.Creates a piped output stream.- Parameters:
config- non-null configuration- Returns:
- piped output stream
-
createPipedOutputStream
public ClickHousePipedOutputStream createPipedOutputStream(ClickHouseDataConfig config, Runnable postCloseAction) Deprecated.Creates a piped output stream.- Parameters:
config- non-null configurationpostCloseAction- custom action will be performed right after closing the output stream- Returns:
- piped output stream
-
createPipedOutputStream
public ClickHousePipedOutputStream createPipedOutputStream(ClickHouseDataConfig config, ClickHouseWriter writer) Deprecated.Creates a piped output stream.- Parameters:
config- non-null configurationwriter- non-null custom writer- Returns:
- piped output stream
-
createPipedOutputStream
public final ClickHousePipedOutputStream createPipedOutputStream(int bufferSize, int queueSize, int timeout) Deprecated. -
createPipedOutputStream
public ClickHousePipedOutputStream createPipedOutputStream(int bufferSize, int queueSize, int timeout, Runnable postCloseAction) Deprecated. -
createPipedOutputStream
public ClickHousePipedOutputStream createPipedOutputStream(int bufferSize, int queueSize, int timeout, ClickHouseWriter writer) Deprecated.
-