Package cz.o2.proxima.direct.io.blob
Class BulkBlobWriter<BlobT extends BlobBase,AccessorT extends BlobStorageAccessor>
- java.lang.Object
-
- cz.o2.proxima.direct.io.blob.BulkBlobWriter<BlobT,AccessorT>
-
- All Implemented Interfaces:
AttributeWriterBase,BulkAttributeWriter,java.lang.AutoCloseable
- Direct Known Subclasses:
BulkGCloudStorageWriter,BulkS3Writer
@Internal public abstract class BulkBlobWriter<BlobT extends BlobBase,AccessorT extends BlobStorageAccessor> extends java.lang.Object implements BulkAttributeWriter
BulkAttributeWriterfor blob storages.
-
-
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.BulkAttributeWriter
BulkAttributeWriter.Factory<T extends BulkAttributeWriter>
-
-
Constructor Summary
Constructors Constructor Description BulkBlobWriter(AccessorT accessor, Context context)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Close allocated resources of this writer.protected abstract voiddeleteBlobIfExists(BlobT blob)Delete specified blob.EntityDescriptorgetEntityDescriptor()RetrieveEntityDescriptorof thisBulkAttributeWriter.java.net.URIgetUri()Retrieve URI of this writer.voidrollback()Rollback the writer to last committed position.voidupdateWatermark(long watermark)Update watermark when no input data arrives.voidwrite(StreamElement data, long watermark, 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, online
-
Methods inherited from interface cz.o2.proxima.direct.core.BulkAttributeWriter
asFactory, getType
-
-
-
-
Method Detail
-
getEntityDescriptor
public EntityDescriptor getEntityDescriptor()
RetrieveEntityDescriptorof thisBulkAttributeWriter.
-
getUri
public java.net.URI getUri()
Description copied from interface:AttributeWriterBaseRetrieve URI of this writer.- Specified by:
getUriin interfaceAttributeWriterBase- Returns:
- URI of this writer
-
write
public void write(StreamElement data, long watermark, CommitCallback statusCallback)
Description copied from interface:BulkAttributeWriterWrite given serialized attribute value to given entity. Use the statusCallback to commit the whole bulk (of not yet committed elements).- Specified by:
writein interfaceBulkAttributeWriter- Parameters:
data- the data to writerwatermark- watermark of data being writtenstatusCallback- callback to commit the data
-
updateWatermark
public void updateWatermark(long watermark)
Description copied from interface:BulkAttributeWriterUpdate watermark when no input data arrives.- Specified by:
updateWatermarkin interfaceBulkAttributeWriter- Parameters:
watermark- timestamp of the new watermark
-
rollback
public void rollback()
Description copied from interface:AttributeWriterBaseRollback the writer to last committed position.- Specified by:
rollbackin interfaceAttributeWriterBase
-
deleteBlobIfExists
protected abstract void deleteBlobIfExists(BlobT blob)
Delete specified blob.
-
close
public void close()
Description copied from interface:AttributeWriterBaseClose allocated resources of this writer. This is supposed to be idempotent.- Specified by:
closein interfaceAttributeWriterBase- Specified by:
closein interfacejava.lang.AutoCloseable
-
-