Package com.linkedin.venice.writer
Class AbstractVeniceWriter<K,V,U>
- java.lang.Object
-
- com.linkedin.venice.writer.AbstractVeniceWriter<K,V,U>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
VeniceWriter
public abstract class AbstractVeniceWriter<K,V,U> extends java.lang.Object implements java.io.Closeable
A base class which users ofVeniceWriter
can leverage in order to make unit tests easier.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
topicName
-
Constructor Summary
Constructors Constructor Description AbstractVeniceWriter(java.lang.String topicName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close(boolean gracefulClose)
abstract java.util.concurrent.Future<PubSubProduceResult>
delete(K key, PubSubProducerCallback callback, DeleteMetadata deleteMetadata)
abstract void
flush()
java.lang.String
getTopicName()
java.util.concurrent.CompletableFuture<PubSubProduceResult>
put(K key, V value, int valueSchemaId)
abstract java.util.concurrent.CompletableFuture<PubSubProduceResult>
put(K key, V value, int valueSchemaId, PubSubProducerCallback callback)
abstract java.util.concurrent.Future<PubSubProduceResult>
put(K key, V value, int valueSchemaId, PubSubProducerCallback callback, PutMetadata putMetadata)
abstract java.util.concurrent.Future<PubSubProduceResult>
update(K key, U update, int valueSchemaId, int derivedSchemaId, PubSubProducerCallback callback)
-
-
-
Method Detail
-
getTopicName
public java.lang.String getTopicName()
-
put
public java.util.concurrent.CompletableFuture<PubSubProduceResult> put(K key, V value, int valueSchemaId)
-
close
public abstract void close(boolean gracefulClose) throws java.io.IOException
- Throws:
java.io.IOException
-
put
public abstract java.util.concurrent.CompletableFuture<PubSubProduceResult> put(K key, V value, int valueSchemaId, PubSubProducerCallback callback)
-
put
public abstract java.util.concurrent.Future<PubSubProduceResult> put(K key, V value, int valueSchemaId, PubSubProducerCallback callback, PutMetadata putMetadata)
-
delete
public abstract java.util.concurrent.Future<PubSubProduceResult> delete(K key, PubSubProducerCallback callback, DeleteMetadata deleteMetadata)
-
update
public abstract java.util.concurrent.Future<PubSubProduceResult> update(K key, U update, int valueSchemaId, int derivedSchemaId, PubSubProducerCallback callback)
-
flush
public abstract void flush()
-
-