Package ai.superstream.core
Class SuperstreamManager
java.lang.Object
ai.superstream.core.SuperstreamManager
Main manager class for the Superstream library.
-
Method Summary
Modifier and TypeMethodDescriptionconvertPropertiesToMap(Properties properties) static SuperstreamManagerGet the singleton instance of the SuperstreamManager.static booleanCheck if optimization is already in progress for the current thread.booleanoptimizeProducer(String bootstrapServers, String clientId, Properties properties) Optimize the producer properties for a given Kafka cluster.static voidsetOptimizationInProgress(boolean inProgress) Set the optimization in progress flag for the current thread.
-
Method Details
-
isOptimizationInProgress
public static boolean isOptimizationInProgress()Check if optimization is already in progress for the current thread.- Returns:
- true if optimization is in progress, false otherwise
-
setOptimizationInProgress
public static void setOptimizationInProgress(boolean inProgress) Set the optimization in progress flag for the current thread.- Parameters:
inProgress- true if optimization is in progress, false otherwise
-
getInstance
Get the singleton instance of the SuperstreamManager.- Returns:
- The SuperstreamManager instance
-
convertPropertiesToMap
-
optimizeProducer
Optimize the producer properties for a given Kafka cluster.- Parameters:
bootstrapServers- The Kafka bootstrap serversclientId- The client IDproperties- The producer properties to optimize- Returns:
- True if the optimization was successful, false otherwise
-