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
BulkAttributeWriter
for 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 void
close()
Close allocated resources of this writer.protected abstract void
deleteBlobIfExists(BlobT blob)
Delete specified blob.EntityDescriptor
getEntityDescriptor()
RetrieveEntityDescriptor
of thisBulkAttributeWriter
.java.net.URI
getUri()
Retrieve URI of this writer.void
rollback()
Rollback the writer to last committed position.void
updateWatermark(long watermark)
Update watermark when no input data arrives.void
write(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()
RetrieveEntityDescriptor
of thisBulkAttributeWriter
.
-
getUri
public java.net.URI getUri()
Description copied from interface:AttributeWriterBase
Retrieve URI of this writer.- Specified by:
getUri
in interfaceAttributeWriterBase
- Returns:
- URI of this writer
-
write
public void write(StreamElement data, long watermark, CommitCallback statusCallback)
Description copied from interface:BulkAttributeWriter
Write given serialized attribute value to given entity. Use the statusCallback to commit the whole bulk (of not yet committed elements).- Specified by:
write
in 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:BulkAttributeWriter
Update watermark when no input data arrives.- Specified by:
updateWatermark
in interfaceBulkAttributeWriter
- Parameters:
watermark
- timestamp of the new watermark
-
rollback
public void rollback()
Description copied from interface:AttributeWriterBase
Rollback the writer to last committed position.- Specified by:
rollback
in interfaceAttributeWriterBase
-
deleteBlobIfExists
protected abstract void deleteBlobIfExists(BlobT blob)
Delete specified blob.
-
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
-
-