guicedee-hazelcast

Annotation-driven Hazelcast integration for GuicedEE with Vert.x 5: @HazelcastServerOptions for embedded server configuration, @HazelcastClientOptions for client connections, automatic Vert.x cluster manager via HazelcastClusterConfigurator SPI, JCache (JSR-107) annotations (@CacheResult, @CachePut, @CacheRemove), IGuicedHazelcastServerConfig/IGuicedHazelcastClientConfig SPI hooks, distributed maps/queues/locks, multiple join strategies (Multicast, TCP, Kubernetes, None), environment variable overrides (HAZELCAST_*/HAZELCAST_CLIENT_*), and graceful shutdown. Use when adding Hazelcast clustering, configuring Vert.x clustered event-bus, using distributed data structures, or enabling JCache.

5 stars

Best use case

guicedee-hazelcast is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Annotation-driven Hazelcast integration for GuicedEE with Vert.x 5: @HazelcastServerOptions for embedded server configuration, @HazelcastClientOptions for client connections, automatic Vert.x cluster manager via HazelcastClusterConfigurator SPI, JCache (JSR-107) annotations (@CacheResult, @CachePut, @CacheRemove), IGuicedHazelcastServerConfig/IGuicedHazelcastClientConfig SPI hooks, distributed maps/queues/locks, multiple join strategies (Multicast, TCP, Kubernetes, None), environment variable overrides (HAZELCAST_*/HAZELCAST_CLIENT_*), and graceful shutdown. Use when adding Hazelcast clustering, configuring Vert.x clustered event-bus, using distributed data structures, or enabling JCache.

Teams using guicedee-hazelcast should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/guicedee-hazelcast/SKILL.md --create-dirs "https://raw.githubusercontent.com/GuicedEE/ai-rules/main/skills/.system/guicedee-hazelcast/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/guicedee-hazelcast/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How guicedee-hazelcast Compares

Feature / Agentguicedee-hazelcastStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Annotation-driven Hazelcast integration for GuicedEE with Vert.x 5: @HazelcastServerOptions for embedded server configuration, @HazelcastClientOptions for client connections, automatic Vert.x cluster manager via HazelcastClusterConfigurator SPI, JCache (JSR-107) annotations (@CacheResult, @CachePut, @CacheRemove), IGuicedHazelcastServerConfig/IGuicedHazelcastClientConfig SPI hooks, distributed maps/queues/locks, multiple join strategies (Multicast, TCP, Kubernetes, None), environment variable overrides (HAZELCAST_*/HAZELCAST_CLIENT_*), and graceful shutdown. Use when adding Hazelcast clustering, configuring Vert.x clustered event-bus, using distributed data structures, or enabling JCache.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# GuicedEE Hazelcast

Annotation-driven Hazelcast integration for GuicedEE using Vert.x 5 Hazelcast Cluster Manager.

## Core Concept

Declare server and client configuration with annotations — everything is discovered at startup via ClassGraph, wired through Guice, and automatically configures the Vert.x Hazelcast cluster manager for clustered event-bus and distributed data structures.

## Required Flow

1. Add `com.guicedee:hazelcast` dependency.
2. Define server configuration on a class or `package-info.java`:
   ```java
   @HazelcastServerOptions(
       clusterName = "my-cluster",
       startLocal = true,
       joinType = HazelcastServerOptions.JoinType.NONE
   )
   package com.example.cluster;
   ```
   Or for client mode:
   ```java
   @HazelcastClientOptions(
       clusterName = "my-cluster",
       addresses = "192.168.1.10:5701,192.168.1.11:5701"
   )
   package com.example.client;
   ```
3. Use distributed data structures:
   ```java
   public class MyService {
       @Inject
       private HazelcastInstance hz;

       public void doWork() {
           IMap<String, String> map = hz.getMap("my-map");
           map.put("key", "value");
       }
   }
   ```
4. Or access via static helpers:
   ```java
   HazelcastInstance hz = HazelcastPreStartup.getInstance();      // server
   HazelcastInstance hz = HazelcastClientPreStartup.getClientInstance(); // client
   ```
5. Configure `module-info.java`:
   ```java
   module my.app {
       requires com.guicedee.guicedinjection;
       requires com.guicedee.guicedhazelcast;
       exports my.app;
       opens my.app to com.google.guice;
   }
   ```

## Annotations

### `@HazelcastServerOptions`
Embedded server configuration: cluster name, instance name, port, port auto-increment, public address, interfaces, join type (MULTICAST/TCP/KUBERNETES/NONE), multicast settings, TCP members, Kubernetes DNS/namespace, lite member, startLocal, heartbeat, CP subsystem. Targets `TYPE` and `PACKAGE`.

### `@HazelcastClientOptions`
Client connection configuration: cluster name, instance name, addresses, connection timeout, heartbeat interval/timeout, invocation timeout, event threads, smart routing, reconnect mode (OFF/ON/ASYNC), backoff settings, labels. Targets `TYPE` and `PACKAGE`.

## Injectable Components

| Binding | Key | Description |
|---|---|---|
| `HazelcastInstance` | (default) | Client instance singleton (via `HazelcastClientProvider`) |
| `CachingProvider` | (default) | JCache caching provider singleton |
| `CacheManager` | (default) | JCache cache manager singleton |

## Static Access

| Class | Method | Description |
|---|---|---|
| `HazelcastPreStartup` | `getInstance()` | Embedded server instance (if `startLocal=true`) |
| `HazelcastPreStartup` | `getConfig()` | Server `Config` object |
| `HazelcastClientPreStartup` | `getClientInstance()` | Client instance |
| `HazelcastClientPreStartup` | `getConfig()` | Client `ClientConfig` object |

## Vert.x Cluster Integration

When the `com.guicedee.guicedhazelcast` module is on the module path, `HazelcastClusterConfigurator` is automatically discovered via `ServiceLoader<VertxConfigurator>`. It:
- Uses the existing Hazelcast instance if `startLocal=true`
- Falls back to creating a `HazelcastClusterManager` from the server config
- Triggers `VertXPreStartup` to use `buildClustered()` instead of `build()` for the Vert.x instance

This enables clustered event-bus, distributed maps, locks, and counters across Vert.x nodes automatically.

## SPI Extension Points

### `IGuicedHazelcastServerConfig`
Programmatic customization of Hazelcast server `Config`:
```java
public class MyServerConfig implements IGuicedHazelcastServerConfig<MyServerConfig> {
    @Override
    public Config buildConfig(Config config) {
        config.getMapConfig("my-map").setTimeToLiveSeconds(300);
        return config;
    }
}
```
Register: `provides IGuicedHazelcastServerConfig with MyServerConfig;`

### `IGuicedHazelcastClientConfig`
Programmatic customization of Hazelcast client `ClientConfig`:
```java
public class MyClientConfig implements IGuicedHazelcastClientConfig<MyClientConfig> {
    @Override
    public ClientConfig buildConfig(ClientConfig config) {
        config.getNetworkConfig().setRedoOperation(true);
        return config;
    }
}
```
Register: `provides IGuicedHazelcastClientConfig with MyClientConfig;`

## JCache Annotations

JCache annotations are wired via `CacheAnnotationsModule`:
```java
@CacheResult(cacheName = "users")
public User findUser(String userId) { /* ... */ }

@CachePut(cacheName = "users")
public void updateUser(String userId, @CacheValue User user) { /* ... */ }

@CacheRemoveEntry(cacheName = "users")
public void evictUser(String userId) { /* ... */ }
```

## Environment Variable Overrides

Every annotation attribute can be overridden via system properties or environment variables:

### Server: `HAZELCAST_{PROPERTY}`
- `HAZELCAST_CLUSTER_NAME`, `HAZELCAST_INSTANCE_NAME`
- `HAZELCAST_PORT`, `HAZELCAST_PUBLIC_ADDRESS`
- `HAZELCAST_JOIN_TYPE`, `HAZELCAST_TCP_MEMBERS`
- `HAZELCAST_START_LOCAL`, `HAZELCAST_LITE_MEMBER`

### Client: `HAZELCAST_CLIENT_{PROPERTY}`
- `HAZELCAST_CLIENT_CLUSTER_NAME`, `HAZELCAST_CLIENT_ADDRESSES`
- `HAZELCAST_CLIENT_CONNECTION_TIMEOUT_MS`, `HAZELCAST_CLIENT_SMART_ROUTING`
- `HAZELCAST_CLIENT_RECONNECT_MODE`

## Startup Flow

```
IGuiceContext.instance().inject()
 └─ HazelcastPreStartup (server annotation scanning, sort=MIN+70)
     ├─ Discovers @HazelcastServerOptions (classes and package-info.java)
     ├─ Wraps with environment variable resolution (HAZELCAST_*)
     ├─ Applies SPI hooks (IGuicedHazelcastServerConfig)
     └─ Starts embedded instance if startLocal=true
 └─ HazelcastClientPreStartup (client annotation scanning, sort=MIN+71)
     ├─ Discovers @HazelcastClientOptions
     ├─ Wraps with environment variable resolution (HAZELCAST_CLIENT_*)
     ├─ Applies SPI hooks (IGuicedHazelcastClientConfig)
     └─ Connects to remote cluster
 └─ HazelcastClusterConfigurator (VertxConfigurator SPI)
     └─ Configures Vert.x to use HazelcastClusterManager (triggers buildClustered())
 └─ HazelcastBinderGuice (Guice bindings)
     ├─ Binds HazelcastInstance singleton
     ├─ Binds CachingProvider and CacheManager (JCache)
     └─ Installs CacheAnnotationsModule
 └─ HazelcastPreDestroy (shutdown, sort=MAX-100)
     ├─ Shuts down client instance
     └─ Shuts down server instance
```

## Non-Negotiable Constraints

- Module must `requires com.guicedee.guicedhazelcast;`.
- Packages using injection must `opens` to `com.google.guice`.
- `@HazelcastServerOptions` and `@HazelcastClientOptions` can be placed on `package-info.java` (preferred) or any class.
- SPI implementations (`IGuicedHazelcastServerConfig`, `IGuicedHazelcastClientConfig`) must be registered in `module-info.java`.
- Only one `@HazelcastServerOptions` and one `@HazelcastClientOptions` annotation should exist per application.

Related Skills

guicedee-websockets

5
from GuicedEE/ai-rules

RFC 6455 WebSocket support for GuicedEE using Vert.x 5: call-scoped connections, action-based message routing via IWebSocketMessageReceiver SPI, group management and broadcasting, WebSocketServerOptions, and lifecycle hooks. Use when adding WebSocket messaging, implementing real-time communication, managing WebSocket groups, or creating message receivers.

guicedee-webservices

5
from GuicedEE/ai-rules

SOAP web services for GuicedEE using Apache CXF conventions: JAX-WS annotations (@WebService, @WebMethod, @WebParam, @WebResult), code-first and WSDL-first approaches, endpoint publishing, CXF interceptors and logging, MTOM, WS-Security (WSS4J), SOAP 1.1/1.2 bindings, and Guice DI integration. Use when creating SOAP services, publishing JAX-WS endpoints, configuring CXF bindings, or adding WS-Security.

guicedee-web

5
from GuicedEE/ai-rules

Bootstrap reactive HTTP/HTTPS servers with Vert.x 5 inside GuicedEE: Router setup, BodyHandler configuration, TLS/HTTPS, SPI extension points (VertxRouterConfigurator, VertxHttpServerOptionsConfigurator, VertxHttpServerConfigurator), per-verticle sub-routers, and environment-driven configuration. Use when setting up the Vert.x web server, configuring HTTP/HTTPS, adding custom routes or middleware, or managing server options.

guicedee-vertx

5
from GuicedEE/ai-rules

Build reactive services using Vert.x 5 inside the GuicedEE DI lifecycle: event-bus consumers, publishers, verticle deployment, codecs, throttling, clustering, SPI hooks, and JPMS module setup. Use when adding Vert.x event-bus messaging, deploying verticles, wiring reactive endpoints with Guice injection, configuring Vert.x runtime options, or implementing custom codecs and cluster managers.

guicedee-service-registry

5
from GuicedEE/ai-rules

Named service registry with health-aware resolution for GuicedEE. Register services by simple name, auto-construct URLs from cloud DNS suffix, monitor health status, resolve services via registry:name prefix or bare name in rest-client @Endpoint. Supports aliases, multiple external URLs, Kubernetes internal URLs, and per-service health paths. Use when registering named services, checking service health, resolving service URLs by name, or integrating with rest-client for service-to-service calls.

guicedee-rest

5
from GuicedEE/ai-rules

Build Jakarta REST (JAX-RS) services on Vert.x 5 inside GuicedEE: @Path/@GET/@POST route registration, parameter binding (@PathParam, @QueryParam, @HeaderParam, etc.), Guice-managed resource classes, response handling, content negotiation, and JPMS module setup. Use when creating REST endpoints, configuring Jakarta REST resources, or wiring JAX-RS services with Guice injection.

guicedee-rest-client

5
from GuicedEE/ai-rules

Annotation-driven REST client for GuicedEE using Vert.x 5 WebClient: @Endpoint declarations, RestClient<Send, Receive> injection, authentication strategies (Bearer, Basic, API Key, OAuth2, mTLS), path parameters, environment variable overrides, package-level endpoints, service registry integration (bare name or registry: prefix), and RestClientConfigurator SPI. Use when making outbound REST calls, configuring REST client endpoints, or wiring reactive HTTP clients with Guice injection.

guicedee-rabbitmq

5
from GuicedEE/ai-rules

Annotation-driven RabbitMQ integration for GuicedEE with Vert.x 5: @RabbitConnectionOptions, @QueueExchange, @QueueDefinition, QueueConsumer/QueuePublisher injection, exchange management, queue options (priority, TTL, prefetch), publisher confirms, environment variable overrides, and verticle-scoped connections. Use when adding RabbitMQ messaging, declaring exchanges and queues, creating consumers and publishers, or configuring AMQP topology.

guicedee-persistence

5
from GuicedEE/ai-rules

Reactive JPA persistence with Hibernate Reactive 7, Vert.x 5 SQL clients, and Mutiny sessions inside GuicedEE: DatabaseModule setup, persistence.xml configuration, multi-database support, @EntityManager scoping, and environment variable resolution. Use when adding database persistence, configuring Hibernate Reactive, creating DatabaseModule subclasses, wiring Mutiny.SessionFactory, or managing multiple persistence units.

guicedee-openapi

5
from GuicedEE/ai-rules

Automatic OpenAPI 3.1 spec generation and serving for GuicedEE with Vert.x 5: scans Jakarta REST resources at startup, serves /openapi.json and /openapi.yaml endpoints, Swagger annotations support, @OpenAPIDefinition configuration, and companion Swagger UI module. Use when generating API documentation, serving OpenAPI specs, or configuring Swagger annotations on REST resources.

guicedee-metrics

5
from GuicedEE/ai-rules

Application metrics for GuicedEE using Vert.x 5 Dropwizard Metrics and MicroProfile Metrics 5.1: @Counted, @Timed, @MetricMethod annotations, Guice AOP interceptors, Prometheus scrape endpoint, Graphite reporting, JMX exposure, @MetricsOptions configuration, environment variable overrides, and Vert.x built-in metrics (event bus, HTTP, pools). Use when adding application metrics, configuring Prometheus endpoints, creating custom counters/timers, or monitoring Vert.x internals.

guicedee-mail-client

5
from GuicedEE/ai-rules

Annotation-driven SMTP mail client for GuicedEE with Vert.x 5: @MailConnectionOptions for SMTP server configuration, MailService injection for sending text/HTML/multipart emails with attachments, connection pooling, StartTLS/SSL support, DKIM signing, environment variable overrides, and graceful shutdown. Use when sending emails via SMTP, configuring mail connections, or injecting mail services.