@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.StreamingPullResponse)) { return super.equals(obj); } com.google.pubsub.v1.StreamingPullResponse other = (com.google.pubsub.v1.StreamingPullResponse) obj; boolean result = true; result = result && getReceivedMessagesList().equals(other.getReceivedMessagesList()); 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(); if (getReceivedMessagesCount() > 0) { hash = (37 * hash) + RECEIVED_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getReceivedMessagesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Override public void onResponse(StreamingPullResponse response) { channelReconnectBackoffMillis.set(INITIAL_CHANNEL_RECONNECT_BACKOFF.toMillis()); messageDispatcher.processReceivedMessages( response.getReceivedMessagesList(), new Runnable() { @Override public void run() { // Only request more if we're not shutdown. // If errorFuture is done, the stream has either failed or hung up, // and we don't need to request. if (isAlive() && !errorFuture.isDone()) { lock.lock(); try { thisController.request(1); } catch (Exception e) { logger.log(Level.WARNING, "cannot request more messages", e); } finally { lock.unlock(); } } } }); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.StreamingPullResponse)) { return super.equals(obj); } com.google.pubsub.v1.StreamingPullResponse other = (com.google.pubsub.v1.StreamingPullResponse) obj; boolean result = true; result = result && getReceivedMessagesList().equals(other.getReceivedMessagesList()); 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(); if (getReceivedMessagesCount() > 0) { hash = (37 * hash) + RECEIVED_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getReceivedMessagesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }