Represents either a list of other fanout hashes, or a list of blob hashes Generally a file will have a hash which is used to locate the file fanout. From the file fanout you get a list of chunk fanouts, which contains a list of blob hashes Building the content for a file consists of walking over that graph, outputting bytes as you go A row is identified by its hash together with its type, so the same hash value can exist once as a file fanout and once as a chunk fanout. The child hashes live in the associated fanout entries and are returned in insertion order, which is the order the content has to be reassembled in.

Group: Database Entities

Implements: Serializable, Fanout


Properties

PropertyReturnsDescription
actualContentLengthlongThe total number of bytes the content under this fanout expands to, so a file's size can be read without walking the whole graph.
fanoutEntrysList<FanoutEntry>The child entries of this fanout, each holding one child hash. Saving or deleting the fanout cascades to them. The list is not sorted as it comes back from the database, so use getHashes rather than reading it directly when order matters.
fanoutHashStringThe hash that identifies this fanout, which is what a parent fanout or a file record points at to find it. Never null, and unique only when taken together with the type.
hashesList<String>The child hashes of this fanout in the order the content must be reassembled in, sorted by the entry ids. For a file fanout these are chunk fanout hashes; for a chunk fanout they are blob hashes. Not persisted, and it throws if the entries have not been loaded.
idLongGenerated primary key of the fanout row. Null until it has been saved. It is not the content hash, which is a separate column.
typeStringThe fanout type: f for a file fanout, whose entries are the hashes of other fanouts, or c for a chunk fanout, whose entries are blob hashes. Never null, and it is part of the lookup key, so a hash must always be looked up with its type.

Methods

getId()

Returns: Long

Generated primary key of the fanout row. Null until it has been saved. It is not the content hash, which is a separate column.

getFanoutHash()

Returns: String

The hash that identifies this fanout, which is what a parent fanout or a file record points at to find it. Never null, and unique only when taken together with the type.

getType()

Returns: String

The fanout type: f for a file fanout, whose entries are the hashes of other fanouts, or c for a chunk fanout, whose entries are blob hashes. Never null, and it is part of the lookup key, so a hash must always be looked up with its type.

getActualContentLength()

Returns: long

The total number of bytes the content under this fanout expands to, so a file's size can be read without walking the whole graph.

getFanoutEntrys()

Returns: List<FanoutEntry>

The child entries of this fanout, each holding one child hash. Saving or deleting the fanout cascades to them. The list is not sorted as it comes back from the database, so use getHashes rather than reading it directly when order matters.

getHashes()

Returns: List<String>

The child hashes of this fanout in the order the content must be reassembled in, sorted by the entry ids. For a file fanout these are chunk fanout hashes; for a chunk fanout they are blob hashes. Not persisted, and it throws if the entries have not been loaded.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.