Package com.linkedin.venice.blobtransfer
Interface BlobTransferManager<T>
-
- Type Parameters:
T
- the type of the object from the underlying blob client to indicate the upload status. It can be a blob ID indicating the blob has been uploaded or an enum representing the status of the blob transfer.
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Subinterfaces:
P2PBlobTransferManager<T>
- All Known Implementing Classes:
NettyP2PBlobTransferManager
public interface BlobTransferManager<T> extends java.lang.AutoCloseable
A BlobTransferManager is responsible for transferring blobs between two entities, either that Peer to Peer or node to a blob store and vice versa. The underlying blob client is responsible for the actual transfer of the blob.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the blob transfer manager and related resourcesjava.util.concurrent.CompletionStage<? extends java.io.InputStream>
get(java.lang.String storeName, int version, int partition)
Get the blobs for the given storeName and partitionjava.util.concurrent.CompletionStage<T>
put(java.lang.String storeName, int version, int partition)
Put the blob for the given storeName and partitionvoid
start()
Start the blob transfer manager and related resources
-
-
-
Method Detail
-
start
void start() throws java.lang.Exception
Start the blob transfer manager and related resources- Throws:
java.lang.Exception
-
get
@Experimental java.util.concurrent.CompletionStage<? extends java.io.InputStream> get(java.lang.String storeName, int version, int partition) throws VenicePeersNotFoundException
Get the blobs for the given storeName and partition- Parameters:
storeName
-version
-partition
-- Returns:
- the InputStream of the blob. The return type is experimental and may change in the future.
- Throws:
VenicePeersNotFoundException
- when the peers are not found for the requested blob. Other exceptions may be thrown, but it's wrapped inside the CompletionStage.
-
put
java.util.concurrent.CompletionStage<T> put(java.lang.String storeName, int version, int partition)
Put the blob for the given storeName and partition- Parameters:
storeName
-version
-partition
-- Returns:
- the type of the object returned from the underlying blob client to indicate the upload status
-
close
void close() throws java.lang.Exception
Close the blob transfer manager and related resources- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-