.withColumnTypes(SELECT_LOCAL) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); } else { .withColumnTypes(SELECT_LOCAL_V2) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); .withColumnTypes(SELECT_PEERS) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); .withColumnTypes(SELECT_PEERS_V2) .withRows(Collections.<Map<String, ?>>singletonList(rowV2)) .build()) .build()); PrimingRequest.queryBuilder() .withQuery("SELECT * FROM system.peers") .withThen(then().withColumnTypes(SELECT_PEERS).withRows(rows.build()).build()) .build()); PrimingRequest.queryBuilder() .withQuery("SELECT * FROM system.peers_v2") .withThen(then().withColumnTypes(SELECT_PEERS_V2).withRows(rowsV2.build()).build())
localMetadata.toArray(new ColumnMetadata[localMetadata.size()])) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); localMetadataV2.toArray(new ColumnMetadata[localMetadataV2.size()])) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); } else { .withColumnTypes(SELECT_LOCAL_V2) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); peersMetadata.toArray(new ColumnMetadata[peersMetadata.size()])) .withRows(Collections.<Map<String, ?>>singletonList(row)) .build()) .build()); peersMetadataV2.toArray(new ColumnMetadata[peersMetadataV2.size()])) .withRows(Collections.<Map<String, ?>>singletonList(rowV2)) .build()) .build()); peersMetadata.toArray(new ColumnMetadata[peersMetadata.size()])) .withRows(rows.build()) .build())
public BatchPrimingRequestBuilder withThen(PrimingRequest.Then.ThenBuilder then) { this.then = then.build(); return this; }
/** * If this method is used on the builder any call to the deprecated withThen methods * will be ignored. * @param then The action to take if the prime matches * @return this */ public PrimingRequestBuilder withThen(Then.ThenBuilder then) { this.then = then.build(); return this; }