Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-3934] Refactor registy module #4120

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

1 change: 0 additions & 1 deletion streampark-console/streampark-console-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<modules>
<module>streampark-registry-api</module>
<module>streampark-registry-core</module>
<module>streampark-registry-it</module>
</modules>

<dependencies>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

package org.apache.streampark.registry.api;

import lombok.NonNull;

import java.io.Closeable;
import java.time.Duration;
import java.util.Collection;

/**
Expand All @@ -33,21 +30,6 @@ public interface Registry extends Closeable {
*/
void start();

/**
* Whether the registry is connected
*
* @return true if connected, false otherwise.
*/
boolean isConnected();

/**
* Connect to the registry, will wait in the given timeout
*
* @param timeout max timeout, if timeout <= 0 will wait indefinitely.
* @throws RegistryException cannot connect in the given timeout
*/
void connectUntilTimeout(@NonNull Duration timeout) throws RegistryException;

/**
* Subscribe the path, when the path has expose {@link Event}, the listener will be triggered.
* <p>
Expand All @@ -58,11 +40,6 @@ public interface Registry extends Closeable {
*/
void subscribe(String path, SubscribeListener listener);

/**
* Add a connection listener to collection.
*/
void addConnectionStateListener(ConnectionListener listener);

/**
* Get the value of the key, if key not exist will throw {@link RegistryException}
*/
Expand All @@ -73,9 +50,8 @@ public interface Registry extends Closeable {
*
* @param key the key, cannot be null
* @param value the value, cannot be null
* @param deleteOnDisconnect if true, when the connection state is disconnected, the key will be deleted
*/
void put(String key, String value, boolean deleteOnDisconnect);
void put(String key, String value);

/**
* Delete the key from the registry
Expand All @@ -94,19 +70,4 @@ public interface Registry extends Closeable {
* @return true if the key exists
*/
boolean exists(String key);

/**
* Acquire the lock of the prefix {@param key}
*/
boolean acquireLock(String key);

/**
* Acquire the lock of the prefix {@param key}, if acquire in the given timeout return true, else return false.
*/
boolean acquireLock(String key, long timeout);

/**
* Release the lock of the prefix {@param key}
*/
boolean releaseLock(String key);
}
Loading
Loading