Skip to content

Commit

Permalink
Add AutoCloseable on PersistRepository (#31349)
Browse files Browse the repository at this point in the history
* Refactor MetaDataVersion

* Add AutoCloseable on PersistRepository
  • Loading branch information
terrymanu authored May 22, 2024
1 parent 3d37a84 commit 87db43c
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Persist repository.
*/
public interface PersistRepository extends TypedSPI {
public interface PersistRepository extends TypedSPI, AutoCloseable {

/**
* Path separator.
Expand All @@ -48,10 +48,10 @@ public interface PersistRepository extends TypedSPI {
List<String> getChildrenKeys(String key);

/**
* Judge node is exist or not.
* Judge node is existed or not.
*
* @param key key
* @return node is exist or not
* @return node is existed or not
*/
boolean isExisted(String key);

Expand Down Expand Up @@ -87,8 +87,6 @@ default void persistEphemeral(String key, String value) {
*/
void delete(String key);

/**
* Close.
*/
@Override
void close();
}

0 comments on commit 87db43c

Please sign in to comment.