You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2017/07/16 21:06:27 UTC
[10/21] curator git commit: Add comment to close to make clear that
the provider should close its caches
Add comment to close to make clear that the provider should close its caches
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/4909f57c
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/4909f57c
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/4909f57c
Branch: refs/heads/CURATOR-419
Commit: 4909f57c172c3f90f9aedeac07772d228a9c948c
Parents: e158bbc
Author: randgalt <ra...@apache.org>
Authored: Tue Jul 11 09:59:36 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Tue Jul 11 09:59:36 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/curator/x/discovery/ServiceProvider.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/4909f57c/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java
index d606649..f542ed3 100644
--- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java
+++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceProvider.java
@@ -21,6 +21,7 @@ package org.apache.curator.x.discovery;
import org.apache.curator.x.discovery.details.InstanceProvider;
import java.io.Closeable;
+import java.io.IOException;
import java.util.Collection;
/**
@@ -61,4 +62,10 @@ public interface ServiceProvider<T> extends Closeable
* @param instance instance that had an error
*/
public void noteError(ServiceInstance<T> instance);
+
+ /**
+ * Close the provider. Note: it's the provider's responsibility to close any caches it manages
+ */
+ @Override
+ void close() throws IOException;
}