Package ai.superstream
Class Superstream
java.lang.Object
ai.superstream.Superstream
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionio.nats.client.Connectionintcom.google.protobuf.Descriptors.Descriptorbyte[]io.nats.client.JetStreamintintboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidhandleError(String msg) voidinit()initSuperstreamConfig(Map<String, Object> configs) static PropertiesinitSuperstreamProps(Properties properties) byte[]jsonToProto(byte[] msgBytes) normalizeClientConfig(Map<String, ?> javaConfig) byte[]protoToJson(byte[] msgBytes, com.google.protobuf.Descriptors.Descriptor desc) voidregisterClient(Map<String, ?> configs) voidvoidsendClientTypeUpdateReq(String clientType) voidsendGetSchemaRequest(String schemaID) voidsendLearningMessage(byte[] msg) voidvoidvoidupdateTopicPartitions(String topic, Integer partition)
-
Field Details
-
brokerConnection
public io.nats.client.Connection brokerConnection -
jetstream
public io.nats.client.JetStream jetstream -
superstreamJwt
-
superstreamNkey
-
descriptorAsBytes
public byte[] descriptorAsBytes -
descriptor
public com.google.protobuf.Descriptors.Descriptor descriptor -
natsConnectionID
-
clientID
public int clientID -
accountName
-
learningFactor
public int learningFactor -
learningFactorCounter
public int learningFactorCounter -
learningRequestSent
public boolean learningRequestSent -
ProducerSchemaID
-
ConsumerSchemaID
-
SchemaIDMap
-
configs
-
clientCounters
-
type
-
reductionEnabled
-
topicPartitions
-
-
Constructor Details
-
Superstream
-
-
Method Details
-
init
public void init() -
close
public void close() -
registerClient
-
sendClientTypeUpdateReq
-
subscribeToUpdates
public void subscribeToUpdates() -
reportClientsUpdate
public void reportClientsUpdate() -
sendLearningMessage
public void sendLearningMessage(byte[] msg) -
sendRegisterSchemaReq
public void sendRegisterSchemaReq() -
jsonToProto
- Throws:
IOException
-
protoToJson
public byte[] protoToJson(byte[] msgBytes, com.google.protobuf.Descriptors.Descriptor desc) throws IOException - Throws:
IOException
-
sendGetSchemaRequest
-
handleError
-
normalizeClientConfig
-
initSuperstreamConfig
-
initSuperstreamProps
-
updateTopicPartitions
-