@Override public long getCommittedWindowId(String appId, int operatorId) { try { lastWindowFetchCommand.setFilters(Filter.equal(metaTableOperatorIdColumn, operatorId)); lastWindowFetchCommand.setFilters(Filter.equal(metaTableAppIdColumn, appId)); long lastWindow = -1; RecordSet recordSet = client.query(null, lastWindowFetchCommand); while(recordSet.next()) { lastWindow = Long.parseLong(recordSet.getRecord().getValue(metaTableWindowColumn).toString()); } return lastWindow; } catch (AerospikeException ex) { throw new RuntimeException(ex); } }
@Override public long getCommittedWindowId(String appId, int operatorId) { try { lastWindowFetchCommand.setFilters(Filter.equal(metaTableOperatorIdColumn, operatorId)); lastWindowFetchCommand.setFilters(Filter.equal(metaTableAppIdColumn, appId)); long lastWindow = -1; RecordSet recordSet = client.query(null, lastWindowFetchCommand); while (recordSet.next()) { lastWindow = Long.parseLong(recordSet.getRecord().getValue(metaTableWindowColumn).toString()); } return lastWindow; } catch (AerospikeException ex) { throw new RuntimeException(ex); } }
@SuppressWarnings("unchecked") @Override public <T> Iterable<T> aggregate(Filter filter, Class<T> outputType, String module, String function, List<Value> arguments) { Assert.notNull(outputType, "Output type must not be null!"); AerospikePersistentEntity<?> entity = mappingContext .getPersistentEntity(outputType); Statement statement = new Statement(); if (filter != null) statement.setFilters(filter); statement.setSetName(entity.getSetName()); statement.setNamespace(this.namespace); ResultSet resultSet = null; if (arguments != null && arguments.size() > 0) resultSet = this.client.queryAggregate(null, statement, module, function, arguments.toArray(new Value[0])); else resultSet = this.client.queryAggregate(null, statement); return (Iterable<T>) resultSet; }
public ResultSet<T> now() { collectMetaData(); Statement statement = new Statement(); statement.setIndexName(indexName); statement.setNamespace(namespace); statement.setSetName(setName); statement.setFilters(filters); RecordSet recordSet = asynClient.query(policy, statement); return new ResultSet<>(mapper, classConstructor, recordsCache, recordSet, asynClient); }