/** * * * <pre> * This value specifies routing for replication. If not specified, the * "default" application profile will be used. * </pre> * * <code>string app_profile_id = 5;</code> */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); onChanged(); return this; } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); if (hasRows()) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsLimit()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.ReadRowsRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadRowsRequest other = (com.google.bigtable.v2.ReadRowsRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && (hasRows() == other.hasRows()); if (hasRows()) { result = result && getRows().equals(other.getRows()); } result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && (getRowsLimit() == other.getRowsLimit()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * This value specifies routing for replication. If not specified, the * "default" application profile will be used. * </pre> * * <code>string app_profile_id = 5;</code> */ public Builder clearAppProfileId() { appProfileId_ = getDefaultInstance().getAppProfileId(); onChanged(); return this; } /**
/** {@inheritDoc} */ @Override public ListenableFuture<List<FlatRow>> readFlatRowsAsync(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return Futures.transform( createStreamingListener(request, readRowsAsync, request.getTableName()).getAsyncResult(), FLAT_ROW_LIST_TRANSFORMER, MoreExecutors.directExecutor()); }
/** {@inheritDoc} */ @Override public ListenableFuture<List<Row>> readRowsAsync(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return Futures.transform( createStreamingListener(request, readRowsAsync, request.getTableName()).getAsyncResult(), ROW_LIST_TRANSFORMER, MoreExecutors.directExecutor()); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); if (hasRows()) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRows().hashCode(); } if (hasFilter()) { hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsLimit()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** {@inheritDoc} */ @Override public List<FlatRow> readFlatRowsList(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } return FLAT_ROW_LIST_TRANSFORMER.apply( createStreamingListener(request, readRowsAsync, request.getTableName()).getBlockingResult()); }
/** {@inheritDoc} */ @Override public ScanHandler readFlatRows(ReadRowsRequest request, StreamObserver<FlatRow> observer) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } RetryingReadRowsOperation operation = createReadRowsRetryListener(request, observer); // Start the operation. operation.getAsyncResult(); return operation; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.ReadRowsRequest)) { return super.equals(obj); } com.google.bigtable.v2.ReadRowsRequest other = (com.google.bigtable.v2.ReadRowsRequest) obj; boolean result = true; result = result && getTableName().equals(other.getTableName()); result = result && getAppProfileId().equals(other.getAppProfileId()); result = result && (hasRows() == other.hasRows()); if (hasRows()) { result = result && getRows().equals(other.getRows()); } result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && (getRowsLimit() == other.getRowsLimit()); result = result && unknownFields.equals(other.unknownFields); return result; }
if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build();
ReadRowsRequest buildUpdatedRequest() { ReadRowsRequest.Builder newRequest = ReadRowsRequest.newBuilder() .setRows(filterRows()) .setTableName(originalRequest.getTableName()) .setAppProfileId(originalRequest.getAppProfileId()); if (originalRequest.hasFilter()) { newRequest.setFilter(originalRequest.getFilter()); } // If the row limit is set, update it. long numRowsLimit = originalRequest.getRowsLimit(); if (numRowsLimit > 0) { // Updates the {@code numRowsLimit} by removing the number of rows already read. numRowsLimit -= rowCount; checkArgument(numRowsLimit > 0, "The remaining number of rows must be greater than 0."); newRequest.setRowsLimit(numRowsLimit); } return newRequest.build(); }
public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other == com.google.bigtable.v2.ReadRowsRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); } if (!other.getAppProfileId().isEmpty()) { appProfileId_ = other.appProfileId_; onChanged(); } if (other.hasRows()) { mergeRows(other.getRows()); } if (other.hasFilter()) { mergeFilter(other.getFilter()); } if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** {@inheritDoc} */ @Override public ResultScanner<FlatRow> readFlatRows(ReadRowsRequest request) { if (shouldOverrideAppProfile(request.getAppProfileId())) { request = request.toBuilder().setAppProfileId(clientDefaultAppProfileId).build(); } // Delegate all resumable operations to the scanner. It will request a non-resumable scanner // during operation. final ResponseQueueReader reader = new ResponseQueueReader(); RetryingReadRowsOperation operation = createReadRowsRetryListener(request, reader); operation.setResultObserver(new StreamObserver<ReadRowsResponse>(){ @Override public void onNext(ReadRowsResponse value) { reader.addRequestResultMarker(); } @Override public void onError(Throwable t) {} @Override public void onCompleted() {} }); // Start the operation. operation.getAsyncResult(); return new ResumingStreamingResultScanner(reader); }