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.Factory
asFactory()
Convert instance of this view toCachedView.Factory
suitable for serialization.void
close()
Close allocated resources of this writer.AttributeWriterBase.Type
getType()
Retrieve type of the writer.boolean
isTransactional()
OnlineAttributeWriter
online()
Cast this toOnlineAttributeWriter
.TransactionalOnlineAttributeWriter
transactional()
void
write(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:AttributeWriterBase
Cast this toOnlineAttributeWriter
. This is just a syntactic sugar.- Returns:
OnlineAttributeWriter
from this writer
-
getType
public AttributeWriterBase.Type getType()
Description copied from interface:AttributeWriterBase
Retrieve type of the writer.- Returns:
AttributeWriterBase.Type
of the writer
-
write
public void write(StreamElement data, CommitCallback statusCallback)
Description copied from interface:OnlineAttributeWriter
Write given serialized attribute value to given entity.- Parameters:
data
- the data to writestatusCallback
- callback used to commit data processing
-
isTransactional
public boolean isTransactional()
- Returns:
true
is this is aTransactionalOnlineAttributeWriter
.TransactionalOnlineAttributeWriter
is used when writing attribute that supportsTransactionMode
different fromTransactionMode.NONE
.
-
transactional
public TransactionalOnlineAttributeWriter transactional()
- Returns:
this
ifOnlineAttributeWriter.isTransactional()
returns true.
-
asFactory
public CachedView.Factory asFactory()
Description copied from interface:CachedView
Convert instance of this view toCachedView.Factory
suitable for serialization.- Returns:
- the
CachedView.Factory
representing this view
-
close
public void close()
Description copied from interface:AttributeWriterBase
Close allocated resources of this writer. This is supposed to be idempotent.
-
-