public final class DocumentNodeStore extends Object implements org.apache.jackrabbit.oak.spi.state.NodeStore, RevisionContext, org.apache.jackrabbit.oak.spi.commit.Observable, org.apache.jackrabbit.oak.spi.state.Clusterable, NodeStateDiffer
DocumentStore.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.jackrabbit.oak.plugins.document.CommitQueue |
commitQueue
The commit queue to coordinate the commits.
|
static List<String> |
META_PROP_NAMES
List of meta properties which are created by DocumentNodeStore and which needs to be
retained in any cloned copy of DocumentNodeState.
|
static String |
SYS_PROP_DISABLE_JOURNAL |
static FormatVersion |
VERSION |
DEFAULT_DIFFER| Constructor and Description |
|---|
DocumentNodeStore(DocumentNodeStoreBuilder<?> builder) |
public static final FormatVersion VERSION
public static final List<String> META_PROP_NAMES
public static final String SYS_PROP_DISABLE_JOURNAL
protected final org.apache.jackrabbit.oak.plugins.document.CommitQueue commitQueue
public DocumentNodeStore(DocumentNodeStoreBuilder<?> builder)
public void dispose()
@NotNull public @NotNull DocumentStore getDocumentStore()
public void setAsyncDelay(int delay)
public int getAsyncDelay()
public void setMaxBackOffMillis(int time)
public int getMaxBackOffMillis()
public int getChangeSetMaxItems()
public void setChangeSetMaxItems(int changeSetMaxItems)
public int getChangeSetMaxDepth()
public void setChangeSetMaxDepth(int changeSetMaxDepth)
@NotNull public @NotNull ClusterNodeInfo getClusterInfo()
public org.apache.jackrabbit.oak.cache.CacheStats getNodeCacheStats()
public org.apache.jackrabbit.oak.cache.CacheStats getNodeChildrenCacheStats()
@NotNull public @NotNull Iterable<org.apache.jackrabbit.oak.cache.CacheStats> getDiffCacheStats()
public Cache<PathRev,DocumentNodeState> getNodeCache()
public Cache<PathRev,DocumentNodeState.Children> getNodeChildrenCache()
public int getPendingWriteCount()
public boolean isDisableBranches()
@Nullable public @Nullable DocumentNodeState getNode(@NotNull @NotNull String path, @NotNull @NotNull RevisionVector rev)
path - the path of the node.rev - the read revision.null if the node does not exist at the
given revision.public BundlingConfigHandler getBundlingConfigHandler()
public boolean compare(@NotNull
@NotNull AbstractDocumentNodeState node,
@NotNull
@NotNull AbstractDocumentNodeState base,
@NotNull
@NotNull org.apache.jackrabbit.oak.spi.state.NodeStateDiff diff)
compare in interface NodeStateDiffernode - the node to compare.base - the base node to compare against.diff - handler of node state differencestrue if the full diff was performed, or
false if it was aborted as requested by the handler
(see the NodeStateDiff contract for more details)public Closeable addObserver(org.apache.jackrabbit.oak.spi.commit.Observer observer)
addObserver in interface org.apache.jackrabbit.oak.spi.commit.Observable@NotNull public @NotNull DocumentNodeState getRoot()
getRoot in interface org.apache.jackrabbit.oak.spi.state.NodeStore@NotNull public @NotNull org.apache.jackrabbit.oak.spi.state.NodeState merge(@NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, @NotNull @NotNull org.apache.jackrabbit.oak.spi.commit.CommitHook commitHook, @NotNull @NotNull org.apache.jackrabbit.oak.spi.commit.CommitInfo info) throws org.apache.jackrabbit.oak.api.CommitFailedException
merge in interface org.apache.jackrabbit.oak.spi.state.NodeStoreorg.apache.jackrabbit.oak.api.CommitFailedException@NotNull public @NotNull org.apache.jackrabbit.oak.spi.state.NodeState rebase(@NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeBuilder builder)
rebase in interface org.apache.jackrabbit.oak.spi.state.NodeStorepublic org.apache.jackrabbit.oak.spi.state.NodeState reset(@NotNull @NotNull org.apache.jackrabbit.oak.spi.state.NodeBuilder builder)
reset in interface org.apache.jackrabbit.oak.spi.state.NodeStore@NotNull public @NotNull org.apache.jackrabbit.oak.plugins.blob.BlobStoreBlob createBlob(InputStream inputStream) throws IOException
createBlob in interface org.apache.jackrabbit.oak.spi.state.NodeStoreIOExceptionpublic org.apache.jackrabbit.oak.api.Blob getBlob(@NotNull @NotNull String reference)
Blob with the given reference. Note that this method is meant to
be used with secure reference obtained from Blob#reference which is different from blobIdgetBlob in interface org.apache.jackrabbit.oak.spi.state.NodeStorereference - the reference of the blob.public org.apache.jackrabbit.oak.api.Blob getBlobFromBlobId(String blobId)
Blob with the given blobId.blobId - the blobId of the blob.@NotNull public @NotNull String checkpoint(long lifetime, @NotNull @NotNull Map<String,String> properties)
checkpoint in interface org.apache.jackrabbit.oak.spi.state.NodeStore@NotNull public @NotNull String checkpoint(long lifetime)
checkpoint in interface org.apache.jackrabbit.oak.spi.state.NodeStore@NotNull public @NotNull Map<String,String> checkpointInfo(@NotNull @NotNull String checkpoint)
checkpointInfo in interface org.apache.jackrabbit.oak.spi.state.NodeStore@NotNull public @NotNull Iterable<String> checkpoints()
checkpoints in interface org.apache.jackrabbit.oak.spi.state.NodeStore@Nullable public @Nullable org.apache.jackrabbit.oak.spi.state.NodeState retrieve(@NotNull @NotNull String checkpoint)
retrieve in interface org.apache.jackrabbit.oak.spi.state.NodeStorepublic boolean release(@NotNull
@NotNull String checkpoint)
release in interface org.apache.jackrabbit.oak.spi.state.NodeStorepublic org.apache.jackrabbit.oak.plugins.document.UnmergedBranches getBranches()
getBranches in interface RevisionContextpublic org.apache.jackrabbit.oak.plugins.document.UnsavedModifications getPendingModifications()
getPendingModifications in interface RevisionContextpublic int getClusterId()
getClusterId in interface RevisionContext@NotNull public @NotNull RevisionVector getHeadRevision()
getHeadRevision in interface RevisionContext@NotNull public @NotNull Revision newRevision()
newRevision in interface RevisionContext@NotNull public @NotNull org.apache.jackrabbit.oak.stats.Clock getClock()
getClock in interface RevisionContextpublic String getCommitValue(@NotNull @NotNull Revision changeRevision, @NotNull @NotNull NodeDocument doc)
RevisionContextnull : the change revision does not have an entry on
the commit root document and is not committed.getCommitValue in interface RevisionContextchangeRevision - the revision a change was made.doc - the document where the change was made.null if the change does not
have a commit value (yet).public void runBackgroundOperations()
@Nullable public @Nullable org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector createBlobGarbageCollector(long blobGcMaxAgeInSecs, String repositoryId, org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard, org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider)
blobGcMaxAgeInSecs - repositoryId - whiteboard - statisticsProvider - public DocumentNodeStoreMBean getMBean()
public org.apache.jackrabbit.oak.spi.blob.BlobStore getBlobStore()
public Iterator<org.apache.jackrabbit.oak.plugins.blob.ReferencedBlob> getReferencedBlobsIterator()
In some cases the iterator might implement Closeable. So
callers should check for such iterator and close them.
public org.apache.jackrabbit.oak.plugins.document.DiffCache getDiffCache()
public org.apache.jackrabbit.oak.plugins.document.Checkpoints getCheckpoints()
@NotNull public @NotNull VersionGarbageCollector getVersionGarbageCollector()
@NotNull public @NotNull JournalGarbageCollector getJournalGarbageCollector()
@NotNull public @NotNull LastRevRecoveryAgent getLastRevRecoveryAgent()
public String getInstanceId()
getInstanceId in interface org.apache.jackrabbit.oak.spi.state.Clusterablepublic String getVisibilityToken()
getVisibilityToken in interface org.apache.jackrabbit.oak.spi.state.Clusterablepublic boolean isVisible(@NotNull
@NotNull String visibilityToken,
long maxWaitMillis)
throws InterruptedException
isVisible in interface org.apache.jackrabbit.oak.spi.state.ClusterableInterruptedExceptionpublic DocumentNodeStoreStatsCollector getStatsCollector()
public DocumentNodeStateCache getNodeStateCache()
public void setNodeStateCache(DocumentNodeStateCache nodeStateCache)
public JournalPropertyHandlerFactory getJournalPropertyHandlerFactory()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.