Deprecate waitKey and expose client

This commit is contained in:
Mark Vainomaa 2016-10-02 16:24:34 +03:00
parent f7a971ad8e
commit e0a9e3bda5
2 changed files with 15 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package eu.mikroskeem.utils.etcdconnector; package eu.mikroskeem.utils.etcdconnector;
import mousio.etcd4j.EtcdClient;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -73,8 +74,18 @@ public interface EtcdConnector {
/** /**
* Waits for key change * Waits for key change
* *
* Deprecated: it is broken, literally
*
* @param path Key path * @param path Key path
* @param callback Callback to run * @param callback Callback to run
*/ */
@Deprecated
void waitKey(@NotNull String path, @NotNull Function<Object,Void> callback); void waitKey(@NotNull String path, @NotNull Function<Object,Void> callback);
/**
* Get client instance
*
* @return Etcd client instance
*/
EtcdClient getClient();
} }

View File

@ -166,4 +166,8 @@ abstract class EtcdConnectorBase implements EtcdConnector {
e.printStackTrace(); e.printStackTrace();
} }
} }
public EtcdClient getClient() {
return etcdClient;
}
} }