Package cz.o2.proxima.direct.io.kafka
Class KafkaWriter<K,V>
- java.lang.Object
-
- cz.o2.proxima.core.storage.AbstractStorage
-
- cz.o2.proxima.direct.core.AbstractAttributeWriter
-
- cz.o2.proxima.direct.core.AbstractOnlineAttributeWriter
-
- cz.o2.proxima.direct.io.kafka.KafkaWriter<K,V>
-
- All Implemented Interfaces:
AttributeWriterBase
,OnlineAttributeWriter
,java.lang.AutoCloseable
public class KafkaWriter<K,V> extends AbstractOnlineAttributeWriter
${link OnlineAttributeWriter} implementation for Kafka.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cz.o2.proxima.core.storage.AbstractStorage
AbstractStorage.SerializableAbstractStorage
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
AttributeWriterBase.Factory<W extends AttributeWriterBase>, AttributeWriterBase.Type
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.OnlineAttributeWriter
OnlineAttributeWriter.Factory<T extends OnlineAttributeWriter>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnlineAttributeWriter.Factory<?>
asFactory()
Convert instance of this writer toAttributeWriterBase.Factory
suitable for serialization.void
close()
Close allocated resources of this writer.void
write(StreamElement data, CommitCallback callback)
Write given serialized attribute value to given entity.-
Methods inherited from class cz.o2.proxima.core.storage.AbstractStorage
equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
bulk, getUri, online
-
Methods inherited from interface cz.o2.proxima.direct.core.OnlineAttributeWriter
getType, isTransactional, rollback, transactional
-
-
-
-
Method Detail
-
write
public void write(StreamElement data, CommitCallback callback)
Description copied from interface:OnlineAttributeWriter
Write given serialized attribute value to given entity.- Parameters:
data
- the data to writecallback
- callback used to commit data processing
-
asFactory
public OnlineAttributeWriter.Factory<?> asFactory()
Description copied from interface:AttributeWriterBase
Convert instance of this writer toAttributeWriterBase.Factory
suitable for serialization.- Returns:
- the
AttributeWriterBase.Factory
representing this reader
-
close
public void close()
Description copied from interface:AttributeWriterBase
Close allocated resources of this writer. This is supposed to be idempotent.- Specified by:
close
in interfaceAttributeWriterBase
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Overrides:
close
in classAbstractOnlineAttributeWriter
-
-