Interface ExternalStore
- All Superinterfaces:
PieceStore
- All Known Implementing Classes:
InPlaceStore
A read-only backend that serves artifacts from where they already lie: files on
this host (
InPlaceStore) or objects behind a remote service, read by
range. The swarm never writes to it. A host hashes the artifact, then calls
Content.publishExternal(ExternalStore, String, ContentRoots.Hashed, PublishOptions),
which builds the manifest and registers it here under the host's key; every piece
is hashed whole at its first serve (PieceStore.external()).-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanexternal()Whether this backend serves bytes the swarm did not write and verify itself, such as files in place or objects behind a remote service.voidRegisters an artifact as complete under a key this backend understands: a file path, an object key.
-
Method Details
-
register
-
external
default boolean external()Description copied from interface:PieceStoreWhether this backend serves bytes the swarm did not write and verify itself, such as files in place or objects behind a remote service. The swarm hashes each piece of an external backend whole at its first serve and forgets the root on a mismatch (LB-T-10); it skips external roots in its sampled check on start, since reading them may cost a remote call.- Specified by:
externalin interfacePieceStore- Returns:
- true for an external backend; false by default
-