Class TransactionalCachedView
- java.lang.Object
-
- cz.o2.proxima.direct.core.transaction.TransactionalCachedView
-
- All Implemented Interfaces:
AttributeWriterBase,OnlineAttributeWriter,RandomAccessReader,CachedView,java.io.Closeable,java.lang.AutoCloseable
@Internal public class TransactionalCachedView extends java.lang.Object
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
AttributeWriterBase.Type
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.view.CachedView
CachedView.Factory
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.randomaccess.RandomAccessReader
RandomAccessReader.GetRequest<T>, RandomAccessReader.Listing, RandomAccessReader.MultiFetch
-
-
Constructor Summary
Constructors Constructor Description TransactionalCachedView(DirectDataOperator direct, CachedView delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CachedView.FactoryasFactory()Convert instance of this view toCachedView.Factorysuitable for serialization.voidclose()Close allocated resources of this writer.AttributeWriterBase.TypegetType()Retrieve type of the writer.booleanisTransactional()OnlineAttributeWriteronline()Cast this toOnlineAttributeWriter.TransactionalOnlineAttributeWritertransactional()voidwrite(StreamElement data, CommitCallback statusCallback)Write given serialized attribute value to given entity.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.direct.core.AttributeWriterBase
bulk, getUri
-
Methods inherited from interface cz.o2.proxima.direct.core.view.CachedView
assign, assign, assign, assign, cache, getAssigned, getPartitions, getRunningHandle, getUnderlyingReader, getUnderlyingWriter
-
Methods inherited from interface cz.o2.proxima.direct.core.OnlineAttributeWriter
rollback
-
Methods inherited from interface cz.o2.proxima.direct.core.randomaccess.RandomAccessReader
fetchOffset, get, get, get, get, get, getEntityDescriptor, listEntities, listEntities, multiFetch, scanWildcard, scanWildcard, scanWildcard, scanWildcard, scanWildcardAll, scanWildcardAll, scanWildcardAll, scanWildcardAll
-
-
-
-
Constructor Detail
-
TransactionalCachedView
public TransactionalCachedView(DirectDataOperator direct, CachedView delegate)
-
-
Method Detail
-
online
public OnlineAttributeWriter online()
Description copied from interface:AttributeWriterBaseCast this toOnlineAttributeWriter. This is just a syntactic sugar.- Returns:
OnlineAttributeWriterfrom this writer
-
getType
public AttributeWriterBase.Type getType()
Description copied from interface:AttributeWriterBaseRetrieve type of the writer.- Returns:
AttributeWriterBase.Typeof the writer
-
write
public void write(StreamElement data, CommitCallback statusCallback)
Description copied from interface:OnlineAttributeWriterWrite given serialized attribute value to given entity.- Parameters:
data- the data to writestatusCallback- callback used to commit data processing
-
isTransactional
public boolean isTransactional()
- Returns:
trueis this is aTransactionalOnlineAttributeWriter.TransactionalOnlineAttributeWriteris used when writing attribute that supportsTransactionModedifferent fromTransactionMode.NONE.
-
transactional
public TransactionalOnlineAttributeWriter transactional()
- Returns:
thisifOnlineAttributeWriter.isTransactional()returns true.
-
asFactory
public CachedView.Factory asFactory()
Description copied from interface:CachedViewConvert instance of this view toCachedView.Factorysuitable for serialization.- Returns:
- the
CachedView.Factoryrepresenting this view
-
close
public void close()
Description copied from interface:AttributeWriterBaseClose allocated resources of this writer. This is supposed to be idempotent.
-
-