kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: KAFKA-2578; Client Metadata internal state should be synchronized
Date Thu, 10 Dec 2015 18:02:49 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.9.0 a5fa66122 -> 7684f6dd8


KAFKA-2578; Client Metadata internal state should be synchronized

Author: Edward Ribeiro <edward.ribeiro@gmail.com>

Reviewers: Jason Gustafson <jason@confluent.io>, Ismael Juma <ismael@juma.me.uk>,
Ewen Cheslack-Postava <ewen@confluent.io>

Closes #659 from ijuma/KAFKA-2578

(cherry picked from commit ed8748b7d17448a215ebbf68749d311aae30d7f7)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/7684f6dd
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/7684f6dd
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/7684f6dd

Branch: refs/heads/0.9.0
Commit: 7684f6dd88eaa5dfadb09709ab89f8c7e4d466a9
Parents: a5fa661
Author: Edward Ribeiro <edward.ribeiro@gmail.com>
Authored: Thu Dec 10 10:01:58 2015 -0800
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Thu Dec 10 10:02:41 2015 -0800

----------------------------------------------------------------------
 clients/src/main/java/org/apache/kafka/clients/Metadata.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7684f6dd/clients/src/main/java/org/apache/kafka/clients/Metadata.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/Metadata.java b/clients/src/main/java/org/apache/kafka/clients/Metadata.java
index 7e77c18..73a9f33 100644
--- a/clients/src/main/java/org/apache/kafka/clients/Metadata.java
+++ b/clients/src/main/java/org/apache/kafka/clients/Metadata.java
@@ -205,28 +205,28 @@ public final class Metadata {
      * Set state to indicate if metadata for all topics in Kafka cluster is required or not.
      * @param needMetadaForAllTopics boolean indicating need for metadata of all topics in
cluster.
      */
-    public void needMetadataForAllTopics(boolean needMetadaForAllTopics) {
+    public synchronized void needMetadataForAllTopics(boolean needMetadaForAllTopics) {
         this.needMetadataForAllTopics = needMetadaForAllTopics;
     }
 
     /**
      * Get whether metadata for all topics is needed or not
      */
-    public boolean needMetadataForAllTopics() {
+    public synchronized boolean needMetadataForAllTopics() {
         return this.needMetadataForAllTopics;
     }
 
     /**
      * Add a Metadata listener that gets notified of metadata updates
      */
-    public void addListener(Listener listener) {
+    public synchronized void addListener(Listener listener) {
         this.listeners.add(listener);
     }
 
     /**
      * Stop notifying the listener of metadata updates
      */
-    public void removeListener(Listener listener) {
+    public synchronized void removeListener(Listener listener) {
         this.listeners.remove(listener);
     }
 


Mime
View raw message