Releases: Swofty-Developments/SwoftyDataHandler
Releases · Swofty-Developments/SwoftyDataHandler
v1.1.0
What's New
Decoupled PubSub from DataHandler
Storage and pub/sub are now independently configurable. You can mix and match any storage backend with any pub/sub handler.
New PubSubHandler interface — pass it explicitly to DataAPIImpl:
DataAPIImpl api = new DataAPIImpl(storage, pubSubHandler);New Storage Backends
- MongoDataStorage — MongoDB support via
mongodb-driver-sync
New PubSub Handlers
- RedisPubSubHandler — extracted from the old
DistributedEventBus - KeyDBPubSubHandler — KeyDB support (wire-compatible with Redis)
Breaking Changes
DataStorage.supportsListeners()removed — local events now work with all storage backendsDistributedEventBusconstructor now takesPubSubHandlerinstead ofJedisPoolDataAPIImplno longer auto-detects pub/sub from storage type
Example: MongoDB + KeyDB
DataAPIImpl api = new DataAPIImpl(
new MongoDataStorage(mongoClient, "mydb"),
new KeyDBPubSubHandler(new JedisPool("keydb-host", 6379))
);1.0.0
Initial release of SwoftyDataHandler.
Features
- Player fields with type-safe codecs, validation, and namespacing
- Linked/shared fields across players (guilds, islands, parties)
- Versioned codecs with automatic migration chains
- Expiring fields with TTL, extend, and time-remaining
- Atomic transactions with rollback
- Event listeners with Redis Pub/Sub for cross-server distribution
- Bulk operations: leaderboards, queries, pagination, mass updates
- Storage backends: InMemory, File, Redis
- JSON and Binary serialization formats