@Test public void testKafkaJsonSchemaSerializer() { byte[] bytes; bytes = serializer.serialize(topic, null); assertEquals(null, deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, true); assertEquals(true, deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, 123); assertEquals(123, deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, 345L); assertEquals(345, deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, 1.23f); assertEquals(new BigDecimal("1.23"), deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, 2.34d); assertEquals(new BigDecimal("2.34"), deserializer.deserialize(topic, bytes)); bytes = serializer.serialize(topic, "abc"); assertEquals("abc", deserializer.deserialize(topic, bytes)); }
public KafkaJsonSchemaSerializer() { schemaCache = new SynchronizedCache<>(new LRUCache<>(DEFAULT_CACHE_CAPACITY)); }
KafkaJsonSchemaSerializer extends AbstractKafkaJsonSchemaSerializer<T> implements Serializer<T> { public KafkaJsonSchemaSerializer() { schemaCache = new SynchronizedCache<>(new LRUCache<>(DEFAULT_CACHE_CAPACITY)); } }
KafkaJsonSchemaSerializer extends AbstractKafkaJsonSchemaSerializer<T> implements Serializer<T> { public KafkaJsonSchemaSerializer() { schemaCache = new SynchronizedCache<>(new LRUCache<>(DEFAULT_CACHE_CAPACITY)); } KafkaJsonSchemaSerializer();  KafkaJsonSchemaSerializer(SchemaRegistryClient client);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props,
                                   int cacheCapacity); }
KafkaJsonSchemaSerializer extends AbstractKafkaJsonSchemaSerializer<T> implements Serializer<T> { public KafkaJsonSchemaSerializer() { schemaCache = new SynchronizedCache<>(new LRUCache<>(DEFAULT_CACHE_CAPACITY)); } KafkaJsonSchemaSerializer();  KafkaJsonSchemaSerializer(SchemaRegistryClient client);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props,
                                   int cacheCapacity); @Override void configure(Map<String, ?> config, boolean isKey); @Override byte[] serialize(String topic, T record); @Override void close(); }
KafkaJsonSchemaSerializer extends AbstractKafkaJsonSchemaSerializer<T> implements Serializer<T> { public KafkaJsonSchemaSerializer() { schemaCache = new SynchronizedCache<>(new LRUCache<>(DEFAULT_CACHE_CAPACITY)); } KafkaJsonSchemaSerializer();  KafkaJsonSchemaSerializer(SchemaRegistryClient client);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props);  KafkaJsonSchemaSerializer(SchemaRegistryClient client, Map<String, ?> props,
                                   int cacheCapacity); @Override void configure(Map<String, ?> config, boolean isKey); @Override byte[] serialize(String topic, T record); @Override void close();  }