MutateRowsResponse.Entry.newBuilder() .setIndex(i++) .setStatus(com.google.rpc.Status.newBuilder().setCode(responseCode.value()))
@java.lang.Override public com.google.bigtable.v2.MutateRowsResponse.Entry buildPartial() { com.google.bigtable.v2.MutateRowsResponse.Entry result = new com.google.bigtable.v2.MutateRowsResponse.Entry(this); result.index_ = index_; if (statusBuilder_ == null) { result.status_ = status_; } else { result.status_ = statusBuilder_.build(); } onBuilt(); return result; }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
com.google.bigtable.v2.MutateRowsResponse.Entry.parser(), extensionRegistry)); break;
input.readMessage(com.google.bigtable.v2.MutateRowsResponse.Entry.parser(), extensionRegistry)); break;
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
private void handleEntries(Iterable<MutateRowsResponse.Entry> entries) { for (MutateRowsResponse.Entry entry : entries) { int index = (int) entry.getIndex(); if (index >= getRequestCount()) { LOG.error("Got extra status: %s", entry); continue; } SettableFuture<MutateRowResponse> future = futures.get(index); if (future == null) { LOG.warn("Could not find a future for index %d.", index); continue; } Status status = entry.getStatus(); if (status.getCode() == io.grpc.Status.Code.OK.value()) { future.set(MutateRowResponse.getDefaultInstance()); } else { future.setException(toException(status)); } } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.MutateRowsResponse.Entry)) { return super.equals(obj); } com.google.bigtable.v2.MutateRowsResponse.Entry other = (com.google.bigtable.v2.MutateRowsResponse.Entry) obj; boolean result = true; result = result && (getIndex() == other.getIndex()); result = result && (hasStatus() == other.hasStatus()); if (hasStatus()) { result = result && getStatus() .equals(other.getStatus()); } return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.bigtable.v2.MutateRowsResponse.Entry)) { return super.equals(obj); } com.google.bigtable.v2.MutateRowsResponse.Entry other = (com.google.bigtable.v2.MutateRowsResponse.Entry) obj; boolean result = true; result = result && (getIndex() == other.getIndex()); result = result && (hasStatus() == other.hasStatus()); if (hasStatus()) { result = result && getStatus().equals(other.getStatus()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + INDEX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getIndex()); if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (index_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, index_); } if (status_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * The result of the request Entry identified by `index`. * Depending on how requests are batched during execution, it is possible * for one Entry to fail due to an error with another Entry. In the event * that this occurs, the same error will be reported for both entries. * </pre> * * <code>.google.rpc.Status status = 2;</code> */ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return getStatus(); }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + INDEX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIndex()); if (hasStatus()) { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
private static Entry createEntry(int i, Status status) { return MutateRowsResponse.Entry.newBuilder().setIndex(i).setStatus(status).build(); }
/** * Adds the content of the message to the {@link #results}. */ public void onMessage(MutateRowsResponse message) { for (Entry entry : message.getEntriesList()) { int index = (int) entry.getIndex(); // Sanity check to make sure that the index returned from the server is valid. if (index >= mapToOriginalIndex.length || index < 0) { messageIsInvalid = true; break; } // Set the result. results[mapToOriginalIndex[index]] = entry.getStatus(); } }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (index_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, index_); } if (status_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getStatus()); } memoizedSize = size; return size; }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType() { return com.google.bigtable.v2.MutateRowsResponse.Entry.getDefaultInstance(); }