public interface Scheduler
Scheduler
instance transforms changes to the content tree
into a queue of commits
.
An implementation is free to employ any scheduling strategy as long
as it guarantees all changes are applied atomically without changing
the semantics of the changes recorded in the NodeBuilder
or
the semantics of the CommitHook
contained in the actual Commit
passed to the schedule
method.
Modifier and Type | Interface and Description |
---|---|
static interface |
Scheduler.SchedulerOption
Scheduling options for parametrizing individual commits.
|
Modifier and Type | Method and Description |
---|---|
String |
checkpoint(long lifetime,
@NotNull Map<String,String> properties)
Creates a new checkpoint of the latest root of the tree.
|
org.apache.jackrabbit.oak.spi.state.NodeState |
getHeadNodeState()
Returns the latest state of the tree.
|
boolean |
removeCheckpoint(String name)
Releases the provided checkpoint.
|
org.apache.jackrabbit.oak.spi.state.NodeState |
schedule(@NotNull Commit commit,
Scheduler.SchedulerOption... schedulingOptions)
Schedule a
commit . |
org.apache.jackrabbit.oak.spi.state.NodeState schedule(@NotNull @NotNull Commit commit, Scheduler.SchedulerOption... schedulingOptions) throws org.apache.jackrabbit.oak.api.CommitFailedException
commit
. This method blocks until the changes in this
commit
have been processed and persisted. That is, until a call
to getHeadNodeState()
would return a node state reflecting those
changes.commit
- the commitschedulingOptions
- implementation specific scheduling optionsorg.apache.jackrabbit.oak.api.CommitFailedException
- if the commit failed and none of the changes
have been applied.String checkpoint(long lifetime, @NotNull @NotNull Map<String,String> properties)
The properties
passed to this methods are associated with the
checkpoint and can be retrieved through the
NodeStore.checkpointInfo(String)
method. Its semantics is entirely application specific.
lifetime
- time (in milliseconds, > 0) that the checkpoint
should remain availableproperties
- properties to associate with the checkpointboolean removeCheckpoint(String name)
true
.name
- string reference of a checkpointtrue
if the checkpoint was successfully removed, or if it doesn't existorg.apache.jackrabbit.oak.spi.state.NodeState getHeadNodeState()
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.