apache / apache/iggy

[Java SDK] Add AutoCloseable support and proper cleanup

Open
#2,210 0 comments 0 reactions 1 assignee Claimed by @mmodzelewski View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.