Class StreamingSnapshotWriter
java.lang.Object
org.impulsegraph.builder.internal.StreamingSnapshotWriter
- All Implemented Interfaces:
SnapshotBuilder
Core streaming writer implementation for Impulse Binary Snapshots v0.9.0 and
v0.10.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDomain(String domainName, DomainDefinition domain) Registers a node domain schema and its data sources.addFooterMetadata(String key, byte[] payload) Adds a raw binary metadata payload to the trailing footer.addFooterMetadata(String key, String value) Adds a custom key-value string metadata attribute to the trailing footer.addRelation(String relationName, RelationDefinition relation) Registers a relation schema and its edge data sources.withSignature(PrivateKey privateKey, List<Certificate> certChain) Cryptographically signs the mandatory SHA-256 payload checksum using the provided private key, embedding the signature and public certificate chain into the file footer.withStagingDirectory(Path tempDir) Configures a local directory for staging temporary files (such as external sort runs when computing CSC from a source-sorted stream, or spilling large string pools).withStagingMemoryLimit(long bytes) Configures maximum RAM limit in bytes for in-memory staging buffers before spilling to disk.withVersion(short version) Configures target binary snapshot specification version (e.g. 9 for v0.9.0 or 10 for v0.10.0).voidwriteTo(WritableByteChannel channel) Sequentially streams the snapshot binary in a strict single-pass to the output channel.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SnapshotBuilder
toByteArray, writeTo, writeTo
-
Constructor Details
-
StreamingSnapshotWriter
public StreamingSnapshotWriter()
-
-
Method Details
-
withVersion
Description copied from interface:SnapshotBuilderConfigures target binary snapshot specification version (e.g. 9 for v0.9.0 or 10 for v0.10.0).- Specified by:
withVersionin interfaceSnapshotBuilder
-
withStagingDirectory
Description copied from interface:SnapshotBuilderConfigures a local directory for staging temporary files (such as external sort runs when computing CSC from a source-sorted stream, or spilling large string pools).- Specified by:
withStagingDirectoryin interfaceSnapshotBuilder
-
withStagingMemoryLimit
Description copied from interface:SnapshotBuilderConfigures maximum RAM limit in bytes for in-memory staging buffers before spilling to disk.- Specified by:
withStagingMemoryLimitin interfaceSnapshotBuilder
-
withSignature
Description copied from interface:SnapshotBuilderCryptographically signs the mandatory SHA-256 payload checksum using the provided private key, embedding the signature and public certificate chain into the file footer.- Specified by:
withSignaturein interfaceSnapshotBuilder
-
addDomain
Description copied from interface:SnapshotBuilderRegisters a node domain schema and its data sources.- Specified by:
addDomainin interfaceSnapshotBuilder
-
addRelation
Description copied from interface:SnapshotBuilderRegisters a relation schema and its edge data sources.- Specified by:
addRelationin interfaceSnapshotBuilder
-
writeTo
Description copied from interface:SnapshotBuilderSequentially streams the snapshot binary in a strict single-pass to the output channel.- Specified by:
writeToin interfaceSnapshotBuilder- Throws:
IOException
-