ChunkedBinaryStore

trait ChunkedBinaryStore[F[_]] extends BinaryStore[F]

A BinaryStore that can also store chunks out of order.

trait BinaryStore[F]
class Object
trait Matchable
class Any

Value members

Abstract methods

def insertChunk(id: BinaryId, chunkDef: ChunkDef, hint: Hint, data: ByteVector): F[InsertChunkResult]

Inserts the given chunk. This method allows to store chunks out of order. It is required to specify the total amount of chunks; thus the total length of the file must be known up front.

Inserts the given chunk. This method allows to store chunks out of order. It is required to specify the total amount of chunks; thus the total length of the file must be known up front.

The first chunk starts at index 0.

The maximum chunk size is constant and defined by the implementation. All chunks must not exceed this length. If the complete file consists of multiple chunks, then only the last one may have less than this size.

Inherited methods

def delete(id: BinaryId): F[Unit]

Deletes all data associated to the given id.

Deletes all data associated to the given id.

Inherited from
BinaryStore
def findBinary(id: BinaryId, range: ByteRange): OptionT[F, Binary[F]]

Finds a binary by its id. The range argument controls which part to return.

Finds a binary by its id. The range argument controls which part to return.

Inherited from
BinaryStore
def insert(hint: Hint): (F, Byte) => BinaryId

Insert the given bytes creating a new id.

Insert the given bytes creating a new id.

Inherited from
BinaryStore
def insertWith(id: BinaryId, hint: Hint): (F, Byte) => Nothing

Insert the given bytes to the given id. If some file already exists by this id, the behavior depends on the implementation.

Insert the given bytes to the given id. If some file already exists by this id, the behavior depends on the implementation.

Inherited from
BinaryStore