Welcome to the UtilityCM repository! This collection of utility classes is designed to enhance your Java development experience by providing advanced and highly reusable components. Our goal is to offer developers powerful tools that simplify common tasks and improve code efficiency.
This repository contains several classes that address common challenges in modern Java development:
TimeSeries
: Manage and analyze time-series data with support for statistical methods and querying by time range.RateLimiter
: Manage and control the rate of operations to prevent overloading resources or services.GraphQLBuilder
: Build and execute GraphQL queries and mutations with ease.StateMachine
: Implement state machines with support for complex transitions and event handling.NetworkManager
: Handle network requests with caching, retries, and monitoring.TaskQueue
: Manage and prioritize asynchronous tasks with support for retries and delays.MetricsCollector
: Collect and analyze performance metrics for better monitoring and optimization.ConcurrentMap
: ExtendConcurrentHashMap
with additional atomic operations and utilities.CryptoUtil
: Provide encryption, decryption, and hashing functionalities using modern algorithms.ConfigManager
: Manage and reload configuration settings dynamically and hierarchically.SystemCalculator
: Calculate and monitor system metrics such as CPU usage, memory usage, and disk space.RedisUtility
: Enhanced Redis utility class with support for JedisCluster and improved configuration.AdvancedFunctionUtility
: Handle advanced function operations and performance metrics.
- Rate Limiting: Avoid service overload and ensure fair usage.
- GraphQL Operations: Simplify the creation and execution of GraphQL queries.
- State Machine Management: Implement and manage complex state transitions easily.
- Network Request Handling: Make HTTP requests with advanced features like caching and retries.
- Task Scheduling: Efficiently manage task execution with priority, delays, and retries.
- Performance Metrics: Track and analyze various performance metrics.
- Concurrent Data Structures: Use advanced concurrent map utilities for atomic operations.
- Cryptographic Functions: Perform encryption, decryption, and hashing securely.
- Dynamic Configuration: Handle configuration files with support for dynamic reloading.
To get started with the UtilityCM, follow these instructions:
- Java 21 or later
You can include these utilities in your project by cloning the repository and adding the classes to your project.
git clone https://github.com/Skogrine/UtilityCM.git
cd UtilityCM
Here's how to use some of the classes provided:
RateLimiter rateLimiter = new RateLimiter(5); // 5 requests per second
boolean allowed = rateLimiter.tryAcquire();
GraphQLBuilder builder = new GraphQLBuilder("https://api.example.com/graphql");
String query = "{ user { id name } }";
String response = builder.execute(query);
StateMachine machine = new StateMachine();
machine.addState("START");
machine.addState("END");
machine.addTransition("START", "END", "startToEnd");
machine.transition("START", "END");
We welcome contributions to improve this repository. If you have suggestions or bug reports, please open an issue or submit a pull request.
Released under MIT by @Skogrine.
For any inquiries, please contact me at [email protected].