[Java SDK] Add AutoCloseable support and proper cleanup
Open
enhancement
java
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 432
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 173
Description
**Title:** `[Java SDK] Add AutoCloseable support and proper cleanup`
**Description:**
Current clients don't implement AutoCloseable and lack proper cleanup methods.
**Proposed Solution:**
```java
public interface IggyClient extends AutoCloseable {
void connect() throws IggyException;
void close() throws IggyException;
boolean isConnected();
// Health check
CompletableFuture healthCheck();
}
// Usage with try-with-resources
try (IggyClient client = IggyClient.builder().build()) {
// Use client
} // Automatic cleanup
```
Contributor guide
Assessment
This issue has not been assessed yet.