Class Superstream

java.lang.Object
ai.superstream.Superstream

public class Superstream extends Object
  • Field Details

    • brokerConnection

      public io.nats.client.Connection brokerConnection
    • jetstream

      public io.nats.client.JetStream jetstream
    • superstreamJwt

      public String superstreamJwt
    • superstreamNkey

      public String superstreamNkey
    • descriptorAsBytes

      public byte[] descriptorAsBytes
    • descriptor

      public com.google.protobuf.Descriptors.Descriptor descriptor
    • natsConnectionID

      public String natsConnectionID
    • clientHash

      public String clientHash
    • accountName

      public String accountName
    • learningFactor

      public int learningFactor
    • learningFactorCounter

      public int learningFactorCounter
    • learningRequestSent

      public boolean learningRequestSent
    • ProducerSchemaID

      public String ProducerSchemaID
    • ConsumerSchemaID

      public String ConsumerSchemaID
    • SchemaIDMap

      public Map<String,com.google.protobuf.Descriptors.Descriptor> SchemaIDMap
    • configs

      public Map<String,Object> configs
    • clientCounters

      public final SuperstreamCounters clientCounters
    • type

      public String type
    • reductionEnabled

      public Boolean reductionEnabled
    • topicPartitions

      public Map<String,Set<Integer>> topicPartitions
    • executorService

      public ExecutorService executorService
    • superstreamReady

      public Boolean superstreamReady
    • canStart

      public Boolean canStart
    • compressionEnabled

      public Boolean compressionEnabled
  • Constructor Details

  • Method Details

    • init

      public void init()
    • close

      public void close()
    • setCompressionUpdateCallback

      public void setCompressionUpdateCallback(Superstream.CompressionUpdateCallback callback)
    • updateClientCounters

      public void updateClientCounters(Consumer<SuperstreamCounters> updateFunction)
    • registerClient

      public void registerClient(Map<String,?> configs)
    • sendClientTypeUpdateReq

      public void sendClientTypeUpdateReq()
    • subscribeToUpdates

      public void subscribeToUpdates()
    • reportClientsUpdate

      public void reportClientsUpdate()
    • convertMap

      public static Map<String,Integer[]> convertMap(Map<String,Set<Integer>> topicPartitions)
    • sendLearningMessage

      public void sendLearningMessage(byte[] msg)
    • sendRegisterSchemaReq

      public void sendRegisterSchemaReq()
    • jsonToProto

      public Superstream.JsonToProtoResult jsonToProto(byte[] msgBytes) throws Exception
      Throws:
      Exception
    • protoToJson

      public byte[] protoToJson(byte[] msgBytes, com.google.protobuf.Descriptors.Descriptor desc) throws Exception
      Throws:
      Exception
    • sendGetSchemaRequest

      public void sendGetSchemaRequest(String schemaID)
    • handleError

      public void handleError(String msg)
    • normalizeClientConfig

      public static Map<String,Object> normalizeClientConfig(Map<String,?> javaConfig)
    • initSuperstreamConfig

      public static Map<String,Object> initSuperstreamConfig(Map<String,Object> configs, String type)
    • initSuperstreamProps

      public static Properties initSuperstreamProps(Properties properties, String type)
    • propertiesToMap

      public static Map<String,Object> propertiesToMap(Properties properties)
    • updateTopicPartitions

      public void updateTopicPartitions(String topic, Integer partition)