JDBCSQLRowStream(ContextInternal ctx, TaskQueue statementsQueue, Statement st, ResultSet rs, int fetchSize) throws SQLException { this.ctx = ctx; this.st = st; this.fetchSize = fetchSize; this.rs = rs; this.statementsQueue = statementsQueue; accumulator = new ArrayDeque<>(fetchSize); metaData = rs.getMetaData(); cols = metaData.getColumnCount(); paused.set(true); stClosed.set(false); rsClosed.set(false); // the first rs is populated in the constructor more.set(true); }
public InfinispanAsyncMultiMap(Vertx vertx, Cache<MultiMapKey, Object> cache) { this.vertx = (VertxInternal) vertx; this.cache = cache; nearCache = new ConcurrentHashMap<>(); cache.addListener(new EntryListener()); taskQueue = new TaskQueue(); }
public FakeAsyncMultiMap(final ConcurrentMap<K, ChoosableSet<V>> map) { this.taskQueue = new TaskQueue(); this.map = map; }
public StreamQuery(Vertx vertx, JDBCStatementHelper helper, SQLOptions options, ContextInternal ctx, TaskQueue statementsQueue, String sql, JsonArray in) { super(vertx, helper, options, ctx); this.sql = sql; this.in = in; this.statementsQueue = statementsQueue; }
public void execute(Connection conn, TaskQueue statementsQueue, Handler<AsyncResult<T>> resultHandler) { ctx.executeBlocking(future -> handle(conn, future), statementsQueue, resultHandler); }