public interface NodeStore
This is a low-level interface that doesn't cover functionality like merging concurrent changes or rejecting new tree states based on some higher-level consistency constraints.
Modifier and Type | Method and Description |
---|---|
String |
checkpoint(long lifetime)
Creates a new checkpoint of the latest root of the tree.
|
Blob |
createBlob(InputStream inputStream)
Create a
Blob from the given input stream. |
Blob |
getBlob(String reference)
Get a blob by its reference.
|
NodeState |
getRoot()
Returns the latest state of the tree.
|
NodeState |
merge(NodeBuilder builder,
CommitHook commitHook,
CommitInfo info)
Merges the changes from the passed
builder into
the store. |
NodeState |
rebase(NodeBuilder builder)
Rebase the changes in the passed
builder on top of the current root state. |
void |
release(String checkpoint) |
NodeState |
reset(NodeBuilder builder)
Reset the passed
builder by throwing away all its changes and
setting its base state to the current root state. |
NodeState |
retrieve(String checkpoint)
Retrieves the root node from a previously created repository checkpoint.
|
NodeState getRoot()
NodeState merge(NodeBuilder builder, CommitHook commitHook, CommitInfo info) throws CommitFailedException
builder
into
the store.builder
- the builder whose changes to applycommitHook
- the commit hook to apply while merging changesinfo
- commit info associated with this merge operationCommitFailedException
- if the merge failedIllegalArgumentException
- if the builder is not acquired
from a root state of this storeNodeState rebase(NodeBuilder builder)
builder
on top of the current root state.builder
- the builder to rebaseIllegalArgumentException
- if the builder is not acquired
from a root state of this storeNodeState reset(NodeBuilder builder)
builder
by throwing away all its changes and
setting its base state to the current root state.builder
- the builder to resetIllegalArgumentException
- if the builder is not acquired
from a root state of this storeBlob createBlob(InputStream inputStream) throws IOException
Blob
from the given input stream. The input stream
is closed after this method returns.inputStream
- The input stream for the Blob
Blob
representing inputStream
IOException
- If an error occurs while reading from the streamBlob getBlob(String reference)
reference
- reference to the blobnull
if the reference does not resolve to a blob.Blob.getReference()
String checkpoint(long lifetime)
lifetime
- time (in milliseconds, > 0) that the checkpoint
should remain availableNodeState retrieve(String checkpoint)
checkpoint
- string reference of a checkpointnull
if the checkpoint is no longer availablevoid release(String checkpoint)
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"