com.clickzetta.platform.client.pool.RowPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.client.pool;
import com.clickzetta.platform.client.api.Row;
public interface RowPool {
enum Type {
ARRAY,
QUEUE,
}
interface Loader {
Row load();
}
void initLoader(Loader loader);
Row acquireRow();
void releaseRow(Row row);
class Builder {
public static RowPool build(RowPool.Type type, int poolSize) {
RowPool rowPool;
switch (type) {
case ARRAY:
rowPool = new RowArrayPool(poolSize);
break;
case QUEUE:
rowPool = new RowQueuePool(poolSize);
break;
default:
throw new IllegalArgumentException(String.format("not support row pool type %s", type));
}
return rowPool;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy