diff --git a/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/PersistRepository.java b/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/PersistRepository.java index b6d1c0cb1e099..66c56758f2d4e 100644 --- a/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/PersistRepository.java +++ b/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/PersistRepository.java @@ -24,7 +24,7 @@ /** * Persist repository. */ -public interface PersistRepository extends TypedSPI { +public interface PersistRepository extends TypedSPI, AutoCloseable { /** * Path separator. @@ -48,10 +48,10 @@ public interface PersistRepository extends TypedSPI { List 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); @@ -87,8 +87,6 @@ default void persistEphemeral(String key, String value) { */ void delete(String key); - /** - * Close. - */ + @Override void close(); }