public class ConsoleSession extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
checkpoint(long lifetimeSeconds)
Creates and returns a checkpoint with the given lifetime in seconds.
|
static ConsoleSession |
create(org.apache.jackrabbit.oak.spi.state.NodeStore store,
org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard) |
org.apache.jackrabbit.oak.spi.state.NodeState |
getRoot()
Returns the currently set root node.
|
org.apache.jackrabbit.oak.spi.state.NodeStore |
getStore() |
org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard |
getWhiteboard() |
@NotNull org.apache.jackrabbit.oak.spi.state.NodeState |
getWorkingNode()
The node state for the current working path.
|
String |
getWorkingPath()
Returns the current working path.
|
boolean |
isAutoRefresh() |
void |
refresh()
Performs a manual refresh of the root node state.
|
void |
retrieve(String checkpoint)
Retrieves the root node from a previously created checkpoint.
|
void |
setAutoRefresh(boolean enable)
Enables or disables auto-refresh of the root node state on
getRoot(). |
String |
setWorkingPath(String path)
Sets a new working path and returns the previously set.
|
public static ConsoleSession create(org.apache.jackrabbit.oak.spi.state.NodeStore store, org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard whiteboard)
public String getWorkingPath()
public String setWorkingPath(String path)
path - the new working path.public String checkpoint(long lifetimeSeconds)
lifetimeSeconds - the lifetime of the checkpoint in seconds.public void retrieve(String checkpoint)
getRoot().checkpoint - the checkpoint reference.public org.apache.jackrabbit.oak.spi.state.NodeState getRoot()
isAutoRefresh() is set,
a fresh root node is retrieved from the store.public org.apache.jackrabbit.oak.spi.state.NodeStore getStore()
public org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard getWhiteboard()
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.state.NodeState getWorkingNode()
public void setAutoRefresh(boolean enable)
getRoot().enable - enables or disables auto-refresh.public boolean isAutoRefresh()
true if auto-refresh is enabled; false
otherwise.public void refresh()
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.