Package cz.o2.proxima.direct.core
Interface OnlineAttributeWriter
-
- All Superinterfaces:
AttributeWriterBase,java.lang.AutoCloseable
- All Known Subinterfaces:
CachedView
- All Known Implementing Classes:
AbstractOnlineAttributeWriter,HttpWriter,JdbcOnlineAttributeWriter,KafkaWriter,LocalCachedPartitionedView,OpenTsdbWriter,TransactionalCachedView,TransactionalOnlineAttributeWriter
@Stable public interface OnlineAttributeWriter extends AttributeWriterBase
Writer for attribute values. This is online version, where each element is committed one after another.The ingest process works as follows:
- incoming request is written into
CommitLog, which is instance of this interface - the message is confirmed to the client, because commit log is persistent, durable and distributed
- next, the message is asynchronously consumed by all writes from the commit log and written to the storages
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceOnlineAttributeWriter.Factory<T extends OnlineAttributeWriter>Serializablefactory forOnlineAttributeWriter.-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
AttributeWriterBase.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description OnlineAttributeWriter.Factory<? extends OnlineAttributeWriter>asFactory()Convert instance of this writer toAttributeWriterBase.Factorysuitable for serialization.default AttributeWriterBase.TypegetType()Retrieve type of the writer.default booleanisTransactional()default voidrollback()Rollback the writer to last committed position.default TransactionalOnlineAttributeWritertransactional()voidwrite(StreamElement data, CommitCallback statusCallback)Write given serialized attribute value to given entity.-
Methods inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
bulk, close, getUri, online
-
-
-
-
Method Detail
-
getType
default AttributeWriterBase.Type getType()
Description copied from interface:AttributeWriterBaseRetrieve type of the writer.- Specified by:
getTypein interfaceAttributeWriterBase- Returns:
AttributeWriterBase.Typeof the writer
-
rollback
default void rollback()
Description copied from interface:AttributeWriterBaseRollback the writer to last committed position.- Specified by:
rollbackin interfaceAttributeWriterBase
-
write
void write(StreamElement data, CommitCallback statusCallback)
Write given serialized attribute value to given entity.- Parameters:
data- the data to writestatusCallback- callback used to commit data processing
-
asFactory
OnlineAttributeWriter.Factory<? extends OnlineAttributeWriter> asFactory()
Description copied from interface:AttributeWriterBaseConvert instance of this writer toAttributeWriterBase.Factorysuitable for serialization.- Specified by:
asFactoryin interfaceAttributeWriterBase- Returns:
- the
AttributeWriterBase.Factoryrepresenting this reader
-
isTransactional
default boolean isTransactional()
- Returns:
trueis this is aTransactionalOnlineAttributeWriter.TransactionalOnlineAttributeWriteris used when writing attribute that supportsTransactionModedifferent fromTransactionMode.NONE.
-
transactional
default TransactionalOnlineAttributeWriter transactional()
- Returns:
thisifisTransactional()returns true.- Throws:
java.lang.UnsupportedOperationException- ifisTransactional()returnsfalse
-
-